Houdini 17.5 Python Scripting hou hou.qt

hou.qt.styleSheet HOM function

Return the Houdini style sheet.

styleSheet() str

You can apply the style sheet to widgets so that they look like native Houdini widgets. Note that child widgets automatically inherit the style sheet from the parent.

import Qt.QtWidgets as QtWidgets

stylesheet = hou.qt.styleSheet()

parent_widget = QtWidgets.QWidget()
parent_widget.setStyleSheet(stylesheet)

child_button = QtWidgets.QPushButton()
child_button.setText("Hello World")

# Parenting the child button inherits the parent's Houdini style sheet.
child_button.setParent(parent_widget)

hou.qt