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

PathView does not work if VisualDataModel is used with a model that is defined outside the VisualDataModel element

XMLWordPrintable

    • 1ba3e41f09ea719249286fede5d3fe96621ccb61

      This bug is best explained by code.

      The following inside a PathView works:
      model: VisualDataModel {
      delegate: Text

      { text: value }

      model : ListModel {
      id: mo
      ListElement

      { value: "ding" }

      ListElement

      { value: "dong" }

      ListElement

      { value: "bell" }

      }
      }

      If you refactor the above code into below, it doesn't work (PathView does not display anything)
      ListModel {
      id: mo
      ListElement

      { value: "ding" }

      ListElement

      { value: "dong" }

      ListElement

      { value: "bell" }

      }

      model: VisualDataModel {
      delegate: Text

      { text: value }

      model : mo
      }

        1. main.qml
          2 kB
        2. QTBUG-16357v2.qml
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            martjone Martin Jones (closed Nokia identity) (Inactive)
            girish Girish Ramakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes