Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.14.2, 6.2.2
-
None
Description
Hello,
I need to test interactions for my application. From the TestCase framework I did not managed to reproduce the behavior I have in my app
- What I mean by "the behavior I have in my app" ?
a MouseArea in my app listen to the positionChanged signal. When the 'onPositionChanged slot is triggered the 'modifiers' property of the MouseEvent is correctly setted
- What I mean by "I did not managed to reproduce from TestCase" ?
From a Testcase when I call mouseDrag function with modifiers parameter setted to something (let's say Qt.ControlModifier), the onPositionChanged triggers but the 'modifiers' property of the MouseEvent is 0. I expected something different from 0
- What I noticed
I test it with Qt5, same problem
If I trigger interactions manually with my mouse during the test then 'mouse.modifiers' is ok
I provide a minimal example of this problem, with a simple qml test file. Like I wrote in the file one of the test seems sick. I copy-paste here what I got from the testcase:
PASS : mouse_test::mouse_test::initTestCase() QDEBUG : mouse_test::mouse_test::test_mouse_click() qml: press | coord(50,50) | buttons(1) | modifiers(67108864) QDEBUG : mouse_test::mouse_test::test_mouse_click() qml: release | coord(50,50) | buttons(0) | modifiers(67108864) QDEBUG : mouse_test::mouse_test::test_mouse_click() qml: click | coord(50,50) | buttons(0) | modifiers(67108864) PASS : mouse_test::mouse_test::test_mouse_click() QDEBUG : mouse_test::mouse_test::test_mouse_drag() qml: press | coord(50,50) | buttons(1) | modifiers(67108864) QDEBUG : mouse_test::mouse_test::test_mouse_drag() qml: move | coord(59,59) | buttons(1) | modifiers(0) QDEBUG : mouse_test::mouse_test::test_mouse_drag() qml: move | coord(83,83) | buttons(1) | modifiers(0) QDEBUG : mouse_test::mouse_test::test_mouse_drag() qml: move | coord(116,116) | buttons(1) | modifiers(0) QDEBUG : mouse_test::mouse_test::test_mouse_drag() qml: move | coord(150,150) | buttons(1) | modifiers(0) QDEBUG : mouse_test::mouse_test::test_mouse_drag() qml: release | coord(150,150) | buttons(0) | modifiers(67108864) QDEBUG : mouse_test::mouse_test::test_mouse_drag() qml: click | coord(150,150) | buttons(0) | modifiers(67108864) PASS : mouse_test::mouse_test::test_mouse_drag() PASS : mouse_test::mouse_test::cleanupTestCase()
From my point of view it seems like a bug. What do you think ?
Best regards
Attachments
Issue Links
- duplicates
-
QTBUG-83637 onPositionChanged does not get modifiers on mouseDrag in qml TestCase
- Reported