Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
4.8.3
-
None
-
Linux
Description
Running on GNOME such that the "gtk" style is default:
QApplication app(argc, argv);
// At this point, QGtkStyle has initialised and set up signal handlers for "gtk-theme" changes
// at some point later...
QApplication::setStyle("plastique");
QApplication::setPalette(myPalette);
QApplication::setFont(myFont);
// We've now changed the style to plastique, so QGtkStyle should have no effect
Now if you change your gtk theme, e.g. via the GNOME Appearance Properties capplet in GNOME 2.x, your palette and font changes are blown away even though you're using plastique (or whatever)
Either passing -style plastique on the command line, or setting the style before QApplication construction prevents QGtkStyle from initialising and prevents the issue, but this is just a workaround.