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

MouseArea interferes with MapGestureArea

    XMLWordPrintable

Details

    Description

      The following code works as expected with Qt 5.9.
      In 5.11, however, doubleclicking around the map after panning/flicking makes the map
      jump for a few times before the gesture area resets to a sane state

      import QtQuick 2.0
      import QtQuick.Window 2.0
      import QtLocation 5.6
      import QtPositioning 5.6
      
      Window {
          width: 512
          height: 512
          visible: true
      
          Plugin {
              id: mapPlugin
              name: "osm" // "mapboxgl", "esri", ...
          }
      
          Map {
              id: map
              anchors.fill: parent
              plugin: mapPlugin
              //gesture.preventStealing: true
              center: QtPositioning.coordinate(59.91, 10.75) // Oslo
              zoomLevel: 14
      
              MouseArea {
                  id: areamouseclick
                  anchors.fill: parent
      
                  onDoubleClicked:{
                      var crd = map.toCoordinate(Qt.point(mouseX, mouseY))
                      txt.text="lat: "+crd.latitude.toFixed(5)+" lng: "+crd.longitude.toFixed(5)
                  }
              }
          }
      
          Text {
              id: txt
              anchors.bottom: parent.bottom
              anchors.horizontalCenter: parent.horizontalCenter
              anchors.bottomMargin: 20
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              kiibimees Lauri Laanmets
              paangele Paolo Angelelli
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes