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

<Unknown File>: QML VisualDataModel: Error creating delegate using nested ListViews

    XMLWordPrintable

Details

    • e17ab5952503595e5be3be3e492a9fb829e9877b

    Description

      To reproduce, run the snippet below and hold the right arrow key down. You'll get the following error message:

      <Unknown File>: QML VisualDataModel: Error creating delegate
      
      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.2
      
      Window {
          width: 640
          height: 480
          title: qsTr("qtbug49224: currentIndex %1").arg(horizontalListView.currentIndex)
          visible: true
      
          ListView {
              id: horizontalListView
              anchors.fill: parent
              orientation: Qt.Horizontal
              focus: true
              clip: true
              model: 40
      
              delegate: ListView {
                  width: 200
                  height: parent.height - 50
                  clip: true
                  model: 100
      
                  property int outerIndex: index
      
                  delegate: Rectangle {
                      width: parent.width
                      height: 30
                      color: "#444"
                      border.color: "white"
      
                      Text {
                          text: outerIndex + ", " + index
                          color: "white"
                          anchors.centerIn: parent
                      }
                  }
              }
      
              Text {
                  text: "Scroll horizontally here"
                  anchors.horizontalCenter: parent.horizontalCenter
                  anchors.bottom: parent.bottom
                  anchors.bottomMargin: 14
              }
          }
      }
      

      Attachments

        1. bug.rar
          2 kB
        2. moviedb-test.tar.bz2
          7 kB
        3. test-case-qt-5.9.4.tar
          25 kB

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              kileppal Kimmo Leppälä
              Votes:
              56 Vote for this issue
              Watchers:
              57 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes