From 9ed3ed5e867d1f21cc739673a46595db9cc9c9b8 Mon Sep 17 00:00:00 2001 From: Alex Huszagh Date: Fri, 29 Apr 2022 11:45:08 -0500 Subject: [PATCH] Update README sections to better describe extending stylesheets. --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4bc8715..97377f9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This stylesheet aims to be similar across all platforms, and provide a nice UI f - [PyQt5 Installation](#pyqt5-installation) - [PyQt6 Installation](#pyqt6-installation) - [Features](#features) -- [Limitations](#limitations) +- [Extending Stylesheets](#extending-stylesheets) - [Debugging](#debugging) - [Development Guide](#development-guide) - [Configuring](#configuring) @@ -391,7 +391,7 @@ def main(): - Cross-platform icon packs for standard icons. - Extensible stylesheets: add your own plugins or rules and automatically configure them using the same configuration syntax. -# Limitations +# Extending Stylesheets There are some limitations of using Qt stylesheets in general, which cannot be solved by stylesheets. To get more fine-grained style control, you should subclass `QCommonStyle`: @@ -402,16 +402,15 @@ class ApplicationStyle: public QCommonStyle } ``` -For an example of using QCommonStyle to override standard icons in a PyQt application, see [standard_icons.py](/example/standard_icons.py). - -An extensive reference can be found [here](https://doc.qt.io/qt-5/style-reference.html). A reference of QStyle, and the default styles Qt provides can be found [here](https://doc.qt.io/qt-5/qstyle.html). - The limitations of stylesheets include: +- Using custom standard icons. - Scaling icons with the theme size. - QToolButton cannot control the icon size without also affecting the arrow size. - Close and dock float icon sizes scale poorly with font size. +For an example of using QCommonStyle to override standard icons in a PyQt application, see [standard_icons.py](/example/standard_icons.py). An extensive reference can be found [here](https://doc.qt.io/qt-5/style-reference.html). A reference of QStyle, and the default styles Qt provides can be found [here](https://doc.qt.io/qt-5/qstyle.html). + # Debugging Have an issue with the styles? Here's a few suggestions, prior to filing a bug report: