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

Regression[6.5.1->6.5.2] QML: Appending an entry including a Qt.rect to a ListModel will result in the rect being undefined

    XMLWordPrintable

Details

    • Windows
    • afe96c4d6 (dev), 278ef0601 (6.6), 79175ef10 (6.5)

    Description

      The attached sample project adds 5 entries to a ListModel on Component.onCompleted:

      listModel.append({ test: Qt.rect(i * 110, 100, 100, 100) }) 

      A Repeater will display green Rectangles, based on the ListModel.

      Running the project with Qt 6.5.1 works fine and 5 green rectangles are displayed.

      Running the project with Qt 6.5.2 will result in:

      qrc:/main.qml:22:72: TypeError: Cannot read property 'height' of undefined
      qrc:/main.qml:22:47: TypeError: Cannot read property 'width' of undefined
      qrc:/main.qml:22:30: TypeError: Cannot read property 'y' of undefined
      qrc:/main.qml:22:13: TypeError: Cannot read property 'x' of undefined 

      Attachments

        1. RepeaterListModel.zip
          2 kB
          Bastian Wolfgruber

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              basti_4tiitoo Bastian Wolfgruber
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes