Solved a button do different job when clicked
-
Hi, I want to create a button, that in first click simple run a function (for example).
void Main::on_pushButton_clicked() { func(); }
and in second click, close the program (or maybe send some signal), but I don't know how can I actually do this...
any one can help me a little with that?
thanks. -
@saeid0034 Then add a boolean variable which you set to true when on_pushButton_clicked() is called first time. Check that variable: if it is set to true then you know that this is second call...
-
@saeid0034 Then add a boolean variable which you set to true when on_pushButton_clicked() is called first time. Check that variable: if it is set to true then you know that this is second call...