I have added onClick
and onDoubleClick
handlers to an item in QML, but both of the events get executed when I double click on the area. I don't know if it has something to do with checking if the clicks were generated by right mouse button. Also the order of placing the code does not affect the problem.
MouseArea {
id: idModuleMouseDebug;
parent: repeaterDelegate;
anchors.fill: parent;
acceptedButtons: Qt.LeftButton | Qt.RightButton
onDoubleClicked: {
if(mouse.button == Qt.RightButton) {
console.log("Double Click");
}
}
onClicked: {
if(mouse.button == Qt.RightButton) {
console.log("Single Click");
}
}
}