gemini Posted September 29, 2020 Share Posted September 29, 2020 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) .. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.