I have a subclass of a QDial
and I want to change the values by moving my mouse up and down. At the moment, the basic implementation allows you to do a circular movement with the mouse to change the values. But I'd like to change them by moving my mouse either up (let's say that once I have pressed my dial, I'll move my mouse to the top of my screen) or down (to the bottom of the screen).
Here's a picture (beware, MS Paint skills ahead) of what I want to achieve. On the left, it's the basic behavior, and on the right, the behavior that I'd like to have.
I don't see how I could get that with mousePressEvent
or mouseMoveEvent
. Does anybody have an idea?