I am using QPushButton() in my programme. With these buttons I rotate my object. Works fine so far. The only Problem is that i have to click multiple times to rotate the object a little further. This is a bit annoying. Isnt there a possibility that the button will stay pressed as long as I press it and the object will rotate further. There is the function pressed(), but there is no difference to clicked().
QAbstractButton has an auto-repeat feature that you can turn on:
button->setAutoRepeat(true);
This will emit the pressed(), released(), and clicked() signals repeatedly. You can also specify how often the signals are emitted (setAutoRepeatInterval
), and how long the button waits before it starts emitting them (setAutoRepeatDelay
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With