Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.15.0
-
None
Description
Most of my application uses the Fusion style with a custom QPalette (set with qApp->setStyle() and qApp->setPalette()), however I set some specific widgets to the system style/palette using QStyleFactory::create(QStringLiteral("windowsvista")) and QStyle::standardPalette(). This works as expected in Qt 5.14.2 and lower, but has stopped working in Qt 5.15.0.
The issue appears to be that QStyle::standardPalette() now returns an empty QPalette where it didn't before. Here is QDebug output from both versions:
Qt 5.14.2:
QPalette(resolve=0x1d3fff,WindowText:[Active:0xff000000,Disabled:0xff787878,Inactive:0xff000000],Button:[Active:0xfff0f0f0,Disabled:0xfff0f0f0,Inactive:0xfff0f0f0],Light:[Active:0xffffffff,Disabled:0xffffffff,Inactive:0xffffffff],Midlight:[Active:0xffe3e3e3,Disabled:0xfff7f7f7,Inactive:0xffe3e3e3],Dark:[Active:0xffa0a0a0,Disabled:0xffa0a0a0,Inactive:0xffa0a0a0],Mid:[Active:0xffa0a0a0,Disabled:0xffa0a0a0,Inactive:0xffa0a0a0],Text:[Active:0xff000000,Disabled:0xff787878,Inactive:0xff000000],BrightText:[Active:0xffffffff,Disabled:0xffffffff,Inactive:0xffffffff],ButtonText:[Active:0xff000000,Disabled:0xff787878,Inactive:0xff000000],Base:[Active:0xffffffff,Disabled:0xfff0f0f0,Inactive:0xffffffff],Window:[Active:0xfff0f0f0,Disabled:0xfff0f0f0,Inactive:0xfff0f0f0],Shadow:[Active:0xff696969,Disabled:0xff000000,Inactive:0xff696969],Highlight:[Active:0xff0078d7,Disabled:0xff0078d7,Inactive:0xfff0f0f0],HighlightedText:[Active:0xffffffff,Disabled:0xffffffff,Inactive:0xff000000],AlternateBase:[Active:0xffe9e7e3,Disabled:0xfff7f7f7,Inactive:0xffe9e7e3],ToolTipBase:[Active:0xffffffdc,Disabled:0xffffffdc,Inactive:0xffffffdc],ToolTipText:[Active:0xff000000,Disabled:0xff000000,Inactive:0xff000000],PlaceholderText:[Active:0x80000000,Disabled:0x80000000,Inactive:0x80000000])
Qt 5.15:
QPalette(resolve=0x0,)
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-85226 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
327434,3 | Update QPalette() documentation to not mention the application palette | dev | qt/qtbase | Status: MERGED | +2 | 0 |
328429,2 | Update QPalette() documentation to not mention the application palette | 6.0 | qt/qtbase | Status: MERGED | +2 | 0 |
328430,2 | Update QPalette() documentation to not mention the application palette | 5.15 | qt/qtbase | Status: MERGED | 0 | 0 |
333271,2 | Update QPalette() documentation to not mention the application palette | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |