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

Map with MouseArea child consumes mouse events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.10.0 RC
    • 5.10.0 Alpha
    • None
    • Win 10/iOS/Android/Linux, Qt 5.10 alpha
    • 62e23e1ae6542b5ab837a2481d9257c81e484013

    Description

      When a MouseArea is attached to a Map then overlaying controls (such as popup menus) do not work properly anymore, e.g. mouse events seem to be consumed by the map.

      Steps to reproduce:

      1. Open the popup menu.
      2. Try to press one of the upper menu entries. Sometimes the menu entry is triggered but most of the time the underlying map is moved. The problem also happens when the MouseArea is disabled.

       

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      import QtQuick.Layouts 1.3
      
      import QtLocation 5.9
      import QtPositioning 5.8
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Map {
              id: map
              anchors.fill: parent
      
              plugin: Plugin {
                  name: "osm"
              }
      
              MouseArea {
                  anchors.fill: parent
                  enabled: false // or true
              }
          }
      
          footer: Button {
              text: "Popup"
      
              onClicked: popup.open()
      
              Menu {
                  id: popup
                  modal: true
      
                  Repeater {
                      model: 10
      
                      MenuItem {
                          text: "Test"
                          onClicked: console.log("Clicked")
                      }
                  }
              }
          }
      }
      
      

      The problem did not appear on Qt 5.9.1.

       

      Attachments

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

        Activity

          People

            smd Jan Arve
            DanielSt Peter Staab
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes