Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30214

Once initialised, QGtkStyle always resets custom palette and font even if another style is in use

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • None
    • 4.8.3
    • GUI: Look'n'Feel
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            alex-weej Alexander Jones
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes