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

QML: strange "Binding loop detected" warning

    XMLWordPrintable

Details

    • Windows
    • 9b1d3a860 (dev), 76e81a3ba (6.5), d8c58faa2 (tqtc/lts-6.2)

    Description

      In Qt 6.2, I'm getting these two warnings:

      qrc:/main.qml:29:17: QML Image: Binding loop detected for property "x"
      qrc:/main.qml:29:17: QML Image: Binding loop detected for property "x"

      Works fine in Qt 5.12.

      Assigning an id to the component fixes/removes this warning.

      Code:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.12
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          ComboBox {
              id: combobox
      
              width: 200
              height: 50
      
              model: 10
      
              indicator: Rectangle {
                  color: "transparent"
                  anchors.verticalCenter: parent.verticalCenter
                  anchors.right: parent.right
                  anchors.rightMargin: 8
                  width: 15
                  height: 15
                  clip: true
                  Image {
                      x: (combobox.popup.opened ? 10 : 0)
                      y: 0
                  }
              }
      
              popup: Popup {
                  //id: myPopup // uncomment to fix the warning
                  y: 1 - height
                  width: combobox.width
                  height: 102
                  padding: 1
      
                  contentItem: Item {
                      ListView {
                          clip: true
                          anchors.fill: parent
                          model: combobox.model
                          currentIndex: combobox.highlightedIndex
                          delegate: combobox.delegate
                      }
                  }
              }
          }
      }
      
      

       

      Attachments

        For Gerrit Dashboard: QTBUG-96351
        # Subject Branch Project Status CR V

        Activity

          People

            fabiankosmale Fabian Kosmale
            alervd Alexander Dyagilev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change