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

Minimal map example - WheelHandler not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.1
    • 6.5.0 RC
    • Location
    • None
    • Linux/Wayland
    • 13d2a4e31 (dev), fbe6f3f4b (dev), 19eaf9f0e (6.5), 9f4ef1785 (6.5)

    Description

      The provided minimal map example

          Map {
              id: map
              anchors.fill: parent
              plugin: mapPlugin
              center: QtPositioning.coordinate(59.91, 10.75) // Oslo
              zoomLevel: 14
              property geoCoordinate startCentroid
      
              PinchHandler {
                  id: pinch
                  target: null
                  onActiveChanged: if (active) {
                      map.startCentroid = map.toCoordinate(pinch.centroid.position, false)
                  }
                  onScaleChanged: (delta) => {
                      map.zoomLevel += Math.log2(delta)
                      map.alignCoordinateToPoint(map.startCentroid, pinch.centroid.position)
                  }
                  onRotationChanged: (delta) => {
                      map.bearing -= delta
                      map.alignCoordinateToPoint(map.startCentroid, pinch.centroid.position)
                  }
                  grabPermissions: PointerHandler.TakeOverForbidden
              }
              WheelHandler {
                  id: wheel
                  rotationScale: 1/120
                  property: "zoomLevel"
              }
              DragHandler {
                  id: drag
                  target: null
                  onTranslationChanged: (delta) => map.pan(-delta.x, -delta.y)
              }
              Shortcut {
                  enabled: map.zoomLevel < map.maximumZoomLevel
                  sequence: StandardKey.ZoomIn
                  onActivated: map.zoomLevel = Math.round(map.zoomLevel + 1)
              }
              Shortcut {
                  enabled: map.zoomLevel > map.minimumZoomLevel
                  sequence: StandardKey.ZoomOut
                  onActivated: map.zoomLevel = Math.round(map.zoomLevel - 1)
              }
          }
      

      has a non working wheel handler.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              cajus Cajus Pollmeier
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes