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

Popup palette not updated when created by Repeater

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.7.0
    • Quick: Controls 2
    • None

    Description

      please

      • use the system's "light" palette
      • run the application
      • change the system's palette to "dark"

      Only the first ComboBox popup background color is updated. The ComboBox instances created by the Repeater are not.

      Objects created by Repeater are not found using QObject::findChildren, so the "hack" to update popup palettes in ApplicationWindow doesn't work.

      This is a follow-up to QTBUG-124474.

      Main.qml from the attached project:

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      
      ApplicationWindow {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
      
        ColumnLayout {
      
          // palette update works
          ComboBox {
            model: ["One", "Two", "Three"]
      
            Component.onCompleted: {
              console.log("POPUP created", popup);
              popup.objectName = "combobox1";
            }
          }
      
          Repeater {
            model: 3
      
            // no palette update
            delegate: ComboBox {
              model: ["REP One", "REP Two", "REP Three"]
      
              Component.onCompleted: {
                console.log("REPATER POPUP created", popup);
                popup.objectName = "combobox2";
              }
            }
          }
        }
      }
      

      Attachments

        1. Screenshot 2024-05-07 at 10.18.51.png
          40 kB
          Nils Jeisecke
        2. untitled9.tgz
          4 kB
          Nils Jeisecke
        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
            njeisecke_qtc Nils Jeisecke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes