Updated the README for various bug fixes.

main
Alex Huszagh 2021-07-15 15:49:45 -05:00
parent 1073a3d580
commit 25ae47bf7c
2 changed files with 8 additions and 8 deletions

View File

@ -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. - 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. - Scaling icons with the theme size.
- QToolButton cannot control the icon size without also affecting the arrow 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 # Debugging

14
test.py
View File

@ -150,13 +150,6 @@ def main(argv=None):
QtWidgets.QApplication.setStyle(style) QtWidgets.QApplication.setStyle(style)
app = QtWidgets.QApplication(argv[:1] + unknown) 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 # use the default font size
font = app.font() font = app.font()
if args.font_size > 0: if args.font_size > 0:
@ -165,6 +158,13 @@ def main(argv=None):
font.setFamily(args.font_family) font.setFamily(args.font_family)
app.setFont(font) 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. # Setup the main window.
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
window.setWindowTitle('Sample single widget application.') window.setWindowTitle('Sample single widget application.')