Jump to content
Sign in to follow this  
gemini

Set Style Sheet of a Houdini Button

Recommended Posts

Hi,

  Can it be done somehow to set style sheet of a Houdini button ?

Thanks!
Sz

...


from PySide2 import QtWidgets

class MainWindow(QtWidgets.QMainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.construct_ui()

    def construct_ui(self):
        self.setStyleSheet(hou.qt.styleSheet())
        self.setProperty("houdiniStyle", True)
        self.setWindowTitle('PySide2 Test')
        # main widget
        main_widget = QtWidgets.QWidget(self)
        self.setCentralWidget(main_widget)
        # layout initialize
        g_layout = QtWidgets.QVBoxLayout()
        layout = QtWidgets.QFormLayout()
        main_widget.setLayout(g_layout)
        # Add Widgets
        self.parm = QtWidgets.QSpinBox()
        self.parm.setValue(30)
        self.parm2 = QtWidgets.QDoubleSpinBox()
        self.parm2.setValue(30)
        layout.addRow('Parameter', self.parm)
        layout.addRow('Parameter', self.parm2)
        self.exec_btn = QtWidgets.QPushButton('Execute')
        self.exec_btn.setStyleSheet("background-color: darkorange")
        self.exec_btn.setFlat( False)

        # global layout setting
        g_layout.addLayout(layout)
        g_layout.addWidget(self.exec_btn)
 

..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×