Is there any way by which I can detect if QDial (with wrapped property set to true) was rotated clockwise or anticlockwise?
Is there any way by which I can detect if QDial (with wrapped property
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let 0 the minimum and 100 the maximum of your wrapped
QDial. If the difference between two consecutive value changes is positive then you have an anti-clockwise rotation, if not you have a clockwise rotation (you have to adjust it to your actual values)You should subclass
QDialand use thesliderMovedsignal :Connect this signal to a slot that calculates if the rotation was clockwise or anti-clockwise
Now you can add a function that returns the
directionproperty of your subclass.