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

Windows 11 Style does not change the palette before QEvent::PaletteChange

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7, 6.8.0
    • GUI: Look'n'Feel
    • None
    • Windows

    Description

      The new Windows 11 style does not change the QWidget::palette() before a QWidget::changeEvent() QEvent::PaletteChange event. This leads to "half light/half dark" applications when the Windows 11 desktop theme is switched between dark/light.

      For reproducing the issue use GPXSee - open the attached GPX file and then switch the Windows desktop theme. The graph QGraphicsView gets the old palette in the QWidget::changeEvent() callback with the Windows 11 style. When the application is launched after the theme change, the palette is correct as it is with the Fusion style (or the KDE style on Linux) even after the switch.

      Attachments

        1. 20240731-162806.gpx
          557 kB
          Martin Tůma
        2. darkmode_graphicsview.gif
          150 kB
          Heiko Thiel
        3. image-2024-11-11-14-15-44-697.png
          3 kB
          Heiko Thiel
        4. image-2024-11-11-14-16-17-264.png
          3 kB
          Heiko Thiel
        For Gerrit Dashboard: QTBUG-130480
        # Subject Branch Project Status CR V

        Activity

          People

            wladimir.leuschner Wladimir Leuschner
            tumic Martin Tůma
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: