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

QStyleHints::colorScheme reports incorrect value and breaks app palette

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS
    • 551cbc5b1 (dev), 7c3222028 (6.6), 9435d8b2c (6.5)

    Description

      Steps to reproduce:

      1. start an app with light style active
      2. open the QFileDialog (doesn't matter if it started from cpp code or via QML's FileDialog)
      3. close the file dialog
      4. switch to another app
      5. switch back to our app ---> palette brakes here, QStyleHints::colorScheme now reports "Dark"

      As a result part of colors are switched to "dark" (e.g. menus, drawers, dialogs, switch backgrounds, etc) while others stay at "light".

      I used a "gallery" example to reproduce this. Insert menu item that will open FileDialog, and print colorScheme into Label.
       

      import Qt.labs.platform as Platform
      ...
          Platform.FileDialog {
              id: fileDialog
          }
      ...
                          Action {
                              text: "File open"
                              onTriggered: fileDialog.open()
                          }
      ...
                  Label {
                      text: "SCHEME: " + Qt.styleHints.colorScheme
      

       

      Switching apps back and forth w/o previously open the file dialog doesn't make an issue.

      Opening and closing file dialog w/o restoring the app doesn't make an issue too.

      Attachments

        Issue Links

          Activity

            People

              dorisverria Doris Verria
              chainik Konstantin Dondoshanskiy
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: