I have a Qt application. There I want to trigger some action while QPushButton is pressed and stop it when button is released. I have read a bit and so far what I found is to reimplement mousePressEvent to start timer to emit signals and do my action and also reimplement mouseReleaseEvent to stop that timer. Is there any other way or that one is the most correct one?
Thanks and regards
QPushbutton
for accessing these signals at all. Useconnect()
or (or Right Click>Go to slot if you're using Qt Designer Form) and you can code what you want to do on press or click. – Aditya