Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.2
-
None
Description
Hi Devs!
Using Qt 6.8.2, if an application-wide style sheet is set, QSpinBoxes take too much vertical space. This is a regression surfaced with Qt 6.8.2, it was not present yet in Qt 6.8.1.
I first thought this was a Plasma Breeze issue, because I didn't see it when using Fusion. I asked in the forums where to begin to search. Decently, Christian Ehrlicher replied at once and mentioned the following two changes that may have caused this:
https://codereview.qt-project.org/c/qt/qtbase/+/601315
https://codereview.qt-project.org/c/qt/qtbase/+/613831
So I filed a KDE bug report at https://bugs.kde.org/show_bug.cgi?id=499906
Somebody with more insight of that replied and stated this was actually an upstream bug, I'll cite:
I added some debug output and to me it looks like a bug in Qt StyleSheetStyle. Without a stylesheet content Breeze sizeFromContents returns QSize(52, 32). WIth a stylesheet it returns the same value. However stylesheet style goes into this clause
and returns QSize(64, 44) looking more closely rule.hasBorder() is true (rule.box() is null and rule.hasNativeBorder() is true). With fusion the base style returns QSize(42, 23) and stylesheet style expands that to QSize(48, 29). Not sure why there is no visible difference but I have no knowledge about the QStyleSheet implementation. I am sorry but I think we need to send this back to Qt.
… so here we are! Would be nice if this was fixed! I'll attach a (quite trivial) minimal example producing the problem along with some screen shots.
Attachments
Issue Links
- relates to
-
QTBUG-133750 Regression with stylesheet in Qt 6.8.2
-
- Closed
-