Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.14.0, 5.14.1
-
None
-
Windows 10
-
-
94c564a0820105c29ca7e3267d0cf797032fd4cb (qt/qtbase/5.15)
Description
In my application (https://github.com/kapitainsky/RcloneBrowser) for macOS, Windows and Linux I allow users to select "dark mode" apearance.
When selected it is done by executing following code during application startup (from MainWindow::MainWindow())
qApp->setStyle(QStyleFactory::create("Fusion")); QPalette darkPalette; darkPalette.setColor(QPalette::Window, QColor(53, 53, 53)); darkPalette.setColor(QPalette::WindowText, Qt::white); darkPalette.setColor(QPalette::Base, QColor(25, 25, 25)); darkPalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); darkPalette.setColor(QPalette::ToolTipBase, Qt::white); darkPalette.setColor(QPalette::ToolTipText, Qt::white); darkPalette.setColor(QPalette::Text, Qt::white); darkPalette.setColor(QPalette::Button, QColor(53, 53, 53)); darkPalette.setColor(QPalette::ButtonText, Qt::white); darkPalette.setColor(QPalette::BrightText, Qt::red); darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); darkPalette.setColor(QPalette::HighlightedText, Qt::black); qApp->setPalette(darkPalette); qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; " "border: 1px solid white; }");
It worked very well with all previous Qt releases but when I moved to 5.14.0 or 5.14.1 things broke in Windows. macOS and Linux still work perfectly.
On Windows when application starts with "dark mode" enabled main window correctly is displayed in dark but when I try to use it any additional dialogue/window opened makes application crash.
When dark mode is not enabled (and above code not executed) all works fine.
Also if I compile it with any older Qt, e.g. 5.13.2 all works.