diff --git a/README.md b/README.md index 86f434a..87f5fb7 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ The limitations of stylesheets include: - Non-border item underlying, such as seen in Breeze. The box model will not affect the placement of the underline, not even with style on the element itself, the `::title` subcontrol, or any other attempts. - Scaling icons with the theme size. - QToolButton cannot control the icon size without also affecting the arrow size. -- The branch indicators on QTreeViews don't scale. +- Close and dock float icon sizes scale poorly with font size. # Debugging diff --git a/test.py b/test.py index cc9bb3c..0e403ff 100644 --- a/test.py +++ b/test.py @@ -150,13 +150,6 @@ def main(argv=None): QtWidgets.QApplication.setStyle(style) app = QtWidgets.QApplication(argv[:1] + unknown) - # setup stylesheet - if args.stylesheet != 'native': - file = QtCore.QFile(f':/{args.stylesheet}.qss') - file.open(QtCore.QFile.ReadOnly | QtCore.QFile.Text) - stream = QtCore.QTextStream(file) - app.setStyleSheet(stream.readAll()) - # use the default font size font = app.font() if args.font_size > 0: @@ -165,6 +158,13 @@ def main(argv=None): font.setFamily(args.font_family) app.setFont(font) + # setup stylesheet + if args.stylesheet != 'native': + file = QtCore.QFile(f':/{args.stylesheet}.qss') + file.open(QtCore.QFile.ReadOnly | QtCore.QFile.Text) + stream = QtCore.QTextStream(file) + app.setStyleSheet(stream.readAll()) + # Setup the main window. window = QtWidgets.QMainWindow() window.setWindowTitle('Sample single widget application.')