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

QML: DragHandler ignores z-order

    XMLWordPrintable

Details

    • All

    Description

      This is a simple example based on the minimal map sample project. As shown in the video, the Map DragHandler reacts to all interactions performed on the pane. The DragHandler also prevents the use of flickables/scroll indicators on a pane or drawer above the map or MapView.

      import QtQuick
      import QtLocation
      import QtQuick.Window
      import QtQuick.Controls
      
      Window {
          width: Qt.platform.os == "android" ? Screen.width : 512
          height: Qt.platform.os == "android" ? Screen.height : 512
          visible: true  
        
          Plugin {
              id: mapPlugin
              name: "osm"
          }    
      
          Map {
              id: map
              anchors.fill: parent
              plugin: mapPlugin
              zoomLevel: 14        DragHandler {
                  id: drag
                  target: null
                  onActiveTranslationChanged: (delta) => map.pan(-delta.x, -delta.y)
              }
          }    
      
          Pane { // you can also use other items
              id: drawer
              height: 200
              width: 400
          }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            peki97 Peter-Christian Kizina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes