I want to create a QML item which disappears when the mouse moves outside of it. Here is my code:
Item {
id: disappearing_element
ListView { ... }
MouseArea {
id: collapser
anchors.fill: parent
propagateComposedEvents: true
hoverEnabled: true
onExited: {
disappearing_element.visible = false
}
}
}
It works well, but MouseArea
propagates events like onClicked()
onDoubleClicked()
only (as said in Qt docs).
Is there a way to notify disappearing_element
's childrens about mouse enter and mouse exit events (without using a Popup
element)?