UPD.
I found a solutions by myself. The only thing you need to do is to introduce a variable which stores a previous position of the cursor. Then you compare it with the current mouse X position each time mouse is moved (onPositionChanged()). If mouse X position is bigger, then this is a right move gesture. If mouse X position is smaller, then this is a left move gesture.
Note: exclude 0 as it leads to undesired behaviour.
Don't forget to update the variable storing the last cursor's position. From my experiece the difference would always be 1, 0 or -1 (we handled 0 case), because the signal is emitted each time the mouse moves (even on a signle pixel).
Qt 6
This is where all Qt 6 related questions belong
827
Topics
4.0k
Posts
-
-
-
-
-
-
This topic is deleted!
Unsolved -
-
-
-
-
-
-
-
TextField Android Keyboard Covering
Unsolved -
-
Qt6 bindings for javascript
Unsolved -
-
This topic is deleted!
Solved -
Qt 6.2 Publish Google Play Error
Unsolved -
This topic is deleted!
Solved