Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.2
-
None
Description
Hi,
In Qt 5.15 it was possible to set a custom palette that was used by the QtQuick Fusion style. That means, if I add the following lines to the Qt Quick Controls Gallery example:
auto p = QGuiApplication::palette();
p.setColor(QPalette::Highlight, Qt::red);
p.setColor(QPalette::HighlightedText, Qt::red);
QGuiApplication::setPalette(p);
and run it with Qt 5.15, then I can see the following:
If I do the same for Qt 6.5.2, then then I can see the following - the system highlight color is used and the application palette is ignored.
I thinks this might be related to the changes documented here:
https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5
We have an application that uses a dark style no matter what style is set in Windows. We use a mixture of QWidget and QtQuick controls and if the user uses light mode in windows, then the fusion style in our application is rendered with wrong colors because it ignores the dark application palette. It worked fine in Qt5.15.
So is there any way in Qt 6.5. to make the QtQuick fusion style respect the application palette?
Attachments
Issue Links
- is required for
-
QTBUG-130030 Consistent support for styling properties in Qt Quick Controls applications
-
- Open
-