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

Infinite loop while trying to open a popup

XMLWordPrintable

    • Linux/X11
    • 62014e9ce (dev)

      Using qml6 tool on the following QML and clicking the button will trigger an infinite loop:

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      import QtQuick.Layouts
      
      Window {
          title: "Test"
          visible: true
      
          Item {
              // uncommenting the following line prevents triggering the bug
              //anchors.centerIn: parent
      
              Button {
                  text: "Popup"
                  onClicked: popup.open()
              }
      
              Popup {
                  id: popup
                  x: Math.round((parent.width - width) / 2)
                  y: Math.round((parent.height - height) / 2)
      
                  ColumnLayout {
                      Rectangle {
                          width: 50
                          height: 50
                          color: "green"
                      }
                      Label { text: "hello" }
                      Label { text: "world" }
                  }
              }
          }
      }
      

      Spamming the following messages:

      qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/Popup.qml: QML QQuickPopupItem: possible QQuickItem::polish() loop
      qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/Popup.qml: QML QQuickPopupItem: QQuickPopupItem called polish() inside updatePolish() of QQuickPopupItem

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

            santhoshkumar Santhosh Kumar Selvaraj
            ux U X
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes