path: root/src/libs
diff options
authorArttu Tarkiainen <>2021-03-09 10:56:03 +0200
committerArttu Tarkiainen <>2021-03-10 06:57:00 +0000
commitc78d7f84cd1ecf2130de16b2b06acf390fad5d06 (patch)
treee976e7a1b4bedb35b6eb37e4a9f3e709666e8396 /src/libs
parent6fdadf83710c37f70c1d2d621eacb9cbb327b23b (diff)
Fix styling of QMessageBoxes
MessageBoxHandler will decide an appropriate parent widget for new QMessageBox objects just before they are shown. This is not quaranteed to be a PackageManagerGui instance, for example when the installer wizard does not have focus, which means the style properties do not get inherited. Rather set the used style sheet for the whole application using QApplication::setStyleSheet(). Task-number: QTIFW-2121 Change-Id: I6f2131279d6f6d3dd41b9eacab8404770aad09a3 Reviewed-by: Katja Marttila <>
Diffstat (limited to 'src/libs')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 86c3a2d0c..d52034389 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -321,7 +321,7 @@ PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent)
QFile sheet(styleSheetFile);
if (sheet.exists()) {
if ( {
- setStyleSheet(QString::fromLatin1(sheet.readAll()));
+ qApp->setStyleSheet(QString::fromLatin1(sheet.readAll()));
} else {
qCWarning(QInstaller::lcDeveloperBuild) << "The specified style sheet file "
"can not be opened.";