MouseArea inside MapQuickItem not clickable?



  • 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')
                        }
    
                    }
                }
            }
        }
    
    }
    
    


  • 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?



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.