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

Global application palette is not reset after calling QApplication::setStyle()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.4.2, 5.7.1
    • None

    Description

      How to reproduce:

      • Be on a system where the default style doesn't work well with palettes (macOS, mostly)
      • Set a custom palette and the style to Fusion.
      • Set the style back to the native one.

      You are stuck with the custom palette. Trying to save the original palette from the style used on start leads to ugly brown dialog windows. There is no way to reset the palette back to system default.

      This is in direct contradiction with the documentation:
      http://doc.qt.io/qt-5/qapplication.html#setStyle

      When switching application styles, the color palette is set back to the initial colors or the system defaults. This is necessary since certain styles have to adapt the color palette to be fully style-guide compliant

      Attachments

        1. 1.png
          1.png
          545 kB
        2. 2.png
          2.png
          574 kB
        3. 3.png
          3.png
          614 kB
        4. main.cpp
          0.2 kB
        5. mainwindow.cpp
          0.4 kB
        6. mainwindow.h
          0.3 kB
        7. mainwindow.ui
          0.9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            peterix Petr Mrazek
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes