Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
I am trying to do something when I push a button. I thought that when I press a button (QPushButton::pressed()), the function inside the button will execute in loop, but it only enters the slot once.
What can I do? Thank you very much!
the function inside the button will execute in loop
what?? What are you trying to achieve exactly?
Do you mean that the signal is triggered repeatedly as long as the button is held down?
The signal is only emitted once when the mouse press event is received.
Is exactly that. I want to keep the button hold and do the function inside it until I released the button.
If you make a loop inside a button, you will strangulate
Its better to use the auto repeat feature
and perform function as long as its repeating the signal
Looping will make you sad :)
@mrjj Thank you very much!!!