I have a QDial
control, and I want/need to block the jump or wrap-around between the minimum and maximum values.
I can not find anything in the documentation nor the properties.
Is that possible at all?
I have a QDial
control, and I want/need to block the jump or wrap-around between the minimum and maximum values.
I can not find anything in the documentation nor the properties.
Is that possible at all?
It is not an overflow. The QDial follows the position of the cursor, regardless of where it went, so when the cursor is near 0, the value is set to 0 regardless of the previous value.
If you want to change this behavior you will have to create your own widget (it can be based on QDial either by inheritance or composition) where you also keep track of where the mouse went to force the user to go through all values in order.
Also you said the issue is that you have a steep change in value and that the value is latter use in hardware. In this case you should have a kind of controller class between the GUI and the hardware that ensure that values are correct for the hardware.
In the QDial properties, go to QDial group and enable 'wrapping', that will solve your problem :)
The value than continous. Below 0 will be -1, -2 ,... and above your max it will also just go on. So you will have to calculate the real value using modulo, but that is by far easier and faster than creating a new control.