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

Nested MapItemView cause crash when closing application

XMLWordPrintable

    • Windows
    • 0af21b1f95180949f75ee2933d4147f610a29b6b (qt/qtlocation/5.12)

      In my project, I used nested MapItemView to show some map items. When running, it works ok. But App crashed  when closing. 

      Here,  show simple codes which can reproduce this problem.

      
      import QtQuick 2.12
      import QtQuick.Window 2.2
      import QtLocation 5.12
      import QtPositioning 5.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Plugin {
              id: mapPlugin
              name: "esri" // "mapboxgl", "esri", ...
          }
      
          Map {
              anchors.fill: parent
              plugin: mapPlugin
              //center: QtPositioning.coordinate(59.91, 10.75) // Oslo
              zoomLevel: 10
              center: QtPositioning.coordinate(31, 116);
              ListModel {
                  id: testModelaaa;
                  ListElement{aa: "iii"}
              }
              ListModel {
                  id: testModelbbb;
                  ListElement{aa: "iii"}
              }
              Component {
                  id: testCom;
                  MapItemView {
                      model: testModelbbb;//routeModel;
                      delegate:
                          MapCircle {
                          visible: true;
                          color: "red"
                          radius: 10000;
                          center: QtPositioning.coordinate(31, 116);
                          Component.onCompleted: {
                              console.log(testModelbbb.count)
                          }
                      }
                  }
              }
              MapItemView {
                  id: routeListView;
                  model: testModelaaa;
                  delegate: testCom
                  Component.onCompleted: {
                      console.log(testModelaaa.count)
                  }
              }
          }
      }
      
      

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

            paangele Paolo Angelelli
            raigor Yongyan Xing
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes