EDIT: I do not want to call the object destructor as suggested in this thread.
I have connected a button to a slot. This slot starts a process.
ui->btnActivate->setText("Start");
connect(ui->btnActivate, SIGNAL(clicked()),this, SLOT(startProcess()));
After the process finishes, I do
ui->btnActivate->setText("Close");
connect(ui->btnActivate, SIGNAL(clicked()),this, SLOT(close()));
But now the button starts the process and then run close. How can I disconnect the first connection before altering the buttons behaviour? I would like to avoid calling the Destructor