Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.1, 6.2.3, 6.2.4, 6.3.0
-
macOS Big Sur 11.6.5 with XCode 13.2.1
CentOS 7.9.2009, MATE 1.16.2, g++ 9.3.0
-
-
1c338e6d07 (qt/qtbase/dev) 1c338e6d07 (qt/tqtc-qtbase/dev) 240a5e9d5b (qt/qtbase/6.3) 240a5e9d5b (qt/tqtc-qtbase/6.3) 9d41bd4312 (qt/qtbase/dev) 9d41bd4312 (qt/tqtc-qtbase/dev) 90e14f94c3 (qt/qtbase/6.3) 90e14f94c3 (qt/tqtc-qtbase/6.3)
Description
In Qt5, having subcontrol-position of QToolButton menu-indicator set to "right" works properly. In Qt6, the menu indicator arrows stays at the center.
A workaround is to use a background-image as the arrow and to control its position with background-position instead of relying on the menu-indicator.
The attached sample code has two style sheets to try:
- stylesheet1 uses the menu-indicator subcontrol-position (works with Qt5, bug with Qt6)
- stylesheet2 uses the background-image/background-position/background-repeat (workaround that works with both Qt5 and Qt6)
See "LINE TO EDIT" in the sample code to switch between the style sheets.
The images attached show the 2 style sheets with either Qt 5.12.3 or
Qt 6.2.1 on macOS Big Sur 11.6.5 with XCode 13.2.1.
Note that the issue is not limited to macOS. It is also observed on Linux
(CentOS 7.9.2009, MATE 1.16.2, g++ 9.3.0 in my case)
Attachments
Issue Links
- is duplicated by
-
QTBUG-101919 QToolButton weird behavior when setStyleSheet.
-
- Closed
-
For Gerrit Dashboard: QTBUG-102866 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
411926,1 | Stylesheet: Another positioning fix for the menu indicator | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: NEW | 0 | 0 |