Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0 Alpha
-
Windows 10
Qt 5.12 Alpha MSVC 2015 64bit
-
-
4840668994739054f0976d90eebe9ccfdff0ed81
Description
There's a regression in MouseArea's onPressed handler when multiple buttons are pressed:
import QtQuick 2.9 import QtQuick.Window 2.2 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") MouseArea { width: parent.width/2 height: parent.height/2 acceptedButtons: Qt.LeftButton | Qt.RightButton onPressed: { if (mouse.button === Qt.LeftButton) { console.log("pressed left"); } else if (mouse.button === Qt.RightButton) { console.log("pressed right"); } } onReleased: { if (mouse.button === Qt.LeftButton) { console.log("released left"); } else if (mouse.button === Qt.RightButton) { console.log("released right"); } } } }
How to reproduce:
1: Click left button in the MouseArea, keep pressed, and press the right button.
2. Release the buttons one after the other.
Expected result (Qt < 5.12):
qml: pressed left
qml: pressed right
qml: released right
qml: released left
Actual result (Qt 5.12 Alpha):
qml: pressed left
qml: released left