Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.14.1
-
None
Description
Hi,
onPositionChanged does not get modifiers on mouseDrag in qml TestCase :
import QtQuick 2.14 import QtTest 1.14 Item { width: 200 height: 200 id: item MouseArea { anchors.fill: parent onClicked: { print("click ", mouse.modifiers) } onPositionChanged: { print('drag : ', mouse.modifiers) } } TestCase { name: "my test" when: windowShown function test_click() { mouseClick(item, item.width / 2,item.height / 2, Qt.LeftButton, Qt.ControlModifier, -1) mouseDrag(item, item.width / 2, item.height / 2,1, 1, Qt.LeftButton, Qt.ControlModifier, -1) } } }
QDEBUG : qmltests::my test::test_click() qml: click 67108864 QDEBUG : qmltests::my test::test_click() qml: drag : 0 QDEBUG : qmltests::my test::test_click() qml: drag : 0 QDEBUG : qmltests::my test::test_click() qml: click 67108864
Line 1: standalone mouseClick modifier is ok
Line 2 and 3 : dragging no modifier NOT OK
Line 4 : onClicked after dragging : modifier is shown OK
But when used outside test, it's ok
So I think it's only mouseDrag fault.
Happy Confinement
Jimmy
Attachments
Issue Links
- is duplicated by
-
QTBUG-100156 mouseDrag in TestCase does not set the modifiers property of MouseEvent correctly
- Closed