dictionaryonclickqmldragclick-through

How to disable clicking through item in qml?


The application I currently work on has a map as a background, and above it various other dialogs(views) with more than one view inside can be opened. When some of the dialogs is active, when dragging over it's background map is moving like there's nothing above it. Does someone know how to disable this? I don't want map to react on clicks or anything inside a dialog.

The project is organised so that each dialog is implemented in separate qml file:

MouseArea {

anchors.fill: parent

onClicked: mouse.accepted = true

}

(parent is Item that holds all elements of a dialog), but this doesn't work.


Solution

  • If I'm understanding your question correctly, it should suffice to set the MouseArea's propagateComposedEvents to false.