techartorg / bqt

A Blender add-on to support & manage Qt Widgets in Blender (PySide2)
https://github.com/techartorg/bqt/wiki
Mozilla Public License 2.0
162 stars 23 forks source link

blender_stylesheet.qss need to be fixed #19

Closed bobchenwenbo closed 1 year ago

bobchenwenbo commented 2 years ago

image

hannesdelbeke commented 1 year ago

Thanks for reporting this. Could you share some sample code to reproduce this?

hannesdelbeke commented 1 year ago

was able to repro with basic radio and check

image
from Qt import QtWidgets

class SampleTool(QtWidgets.QDialog):
    def __init__(self, parent=None):
        super(SampleTool, self).__init__(parent)
        layout = QtWidgets.QVBoxLayout()
        self.button = QtWidgets.QPushButton("Click me")
        layout.addWidget(self.button)
        self.setLayout(layout)
        self.radio_button_1 = QtWidgets.QRadioButton("radio button 1")
        self.radio_button_2 = QtWidgets.QRadioButton("radio button 2")
        layout.addWidget(self.radio_button_1)
        layout.addWidget(self.radio_button_2)
        self.checkbox = QtWidgets.QCheckBox("checkbox")
        layout.addWidget(self.checkbox)

def show():
    main_window = QtWidgets.QApplication.instance().blender_widget
    widget = SampleTool(main_window)
    widget.show()
hannesdelbeke commented 1 year ago

believe this likely is the relative image path in the qss

QRadioButton::indicator:checked {
    image: url(../../startup/bqt/images/QRadioButton_checked.png);
}

likely will also affect QSpinBox::down-arrow, QSpinBox::up-arrow:hover, QComboBox::down-arrow

hannesdelbeke commented 1 year ago

@JeffHanna mentioned in https://github.com/techartorg/bqt/pull/10 to not put stylesheets in startup, this likely was not updated during that refactor.

after removing those lines in the stylesheet the buttons show up again.

hannesdelbeke commented 1 year ago

This has been fixed and merged in main.