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

QML ComboBox breaks dark mode window styling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.2, 6.6.0
    • 6.5.0
    • None
    • Qt 6.5.0
      Windows 11
    • Windows
    • 6f8cc6532 (dev), f0af690d9 (6.5)

    Description

      I am having a really weird issue in the dark mode on windows in connection with a QML ComboBox. The problem I am having is that the dark mode styling "auto detection" breaks as soon I add a ComboBox to the scene.

      Here is a small example:

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          width: 800
          height: 600
          visible: true
      
          menuBar: MenuBar {
              Menu {
                  title: qsTr("File")
                  Action {
                      text: qsTr("&Quit")
                      shortcut: StandardKey.Quit
                      onTriggered: Qt.quit();
                  }
              }
          }
      
          Rectangle {
              anchors.fill: parent
              color: "darkred"
          }
      
      //    ComboBox {
      //        model: ["First", "Second", "Third"]
      //    }
      }
      

       

      Everything looks as one would expect. The menu is styled using the correct system setting (dark mode).

      Once you uncomment the ComboBox in the example above, the menu styling breaks and resorts back to light mode...

      This seems like a bug to me. Can you confirm or am I doing anything wrong?

      I am using Qt 6.5.0 on Windows 11 with MinGW 11.2.0.

       

      Attachments

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

        Activity

          People

            santhoshkumar Santhosh Kumar Selvaraj
            m.wagenbach Maximilian Wagenbach
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes