MouseArea inside MapQuickItem not clickable?
Unsolved
General and Desktop
-
wrote on 7 Apr 2016, 15:31 last edited by
I am trying to add a popup on the map. The only signals work for mousearea are Entered and Exited. None other working.
Here is my code
import QtQuick 2.0 import QtPositioning 5.5 import QtLocation 5.5 import "components" as Components Map{ id: hereMap plugin: mapPlugin activeMapType:hereMap.supportedMapTypes[3] center{ latitude: 41.8890477 longitude: -87.6223297 } zoomLevel: 16 z: 1 MapQuickItem { id: mapMarkerItem property string type anchorPoint.x: markerImage.width/2 anchorPoint.y: markerImage.height coordinate: QtPositioning.coordinate(41.8890477, -87.6223297) sourceItem: Rectangle { id:mapMarker color: "white" //state: "hideToolTip" Image { id: markerImage source: "qrc:/images/images/map-marker.png" width:40 fillMode: Image.PreserveAspectFit MouseArea{ anchors.fill: parent hoverEnabled: true onClicked: { console.log('clicked') } onDoubleClicked: { console.log('double-clicked') } onPressed: { console.log('pressed') } onEntered: { console.log('Entered') } onExited: { console.log('Exited') } } } } } }
-
wrote on 27 Jan 2017, 14:44 last edited by
I just stumbled accros the same odd behavior with Qt 5.7.1. However, the strange thing is, that it seems to be only a problem on android (on windows it's fine). Does anybody know if that's a (already reported) bug?