Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

OpacityMask on a map: how to keep touch working?



  • Hello everybody,

    I need to get qml map with a shape (in my example, a disc).
    I use the "official" example from qt.
    My code:

    Map {
                id: map
                x: 106
                y: 390
                width: 300
                height: 300
                visible: false
                smooth: true
    }
    
    Image {
                 id: mask
                 source: "images/disque300px.png"
                 //sourceSize: Qt.size(300, 300)
                 smooth: true
                 visible: false
                }
    
    OpacityMask {
                 anchors.fill: map
                 source: map
                 maskSource: mask
                }
    

    The result is OK:
    alt text

    But the problem is that the map is no longer sensitive to "touch" (normal, its "visible" state is false)...
    How can I solve this problem?

    Thank you in advance for your response!


Log in to reply