QWizard close
-
Hello!
I am developing a QWizard and I need to know how can I ignore the "finished()" signal when I close the wizard with the X button. I have a slot connected to the finished() signal and I don't want to execute this slot when the wizard is cancelled.
Thank you very much
-
@JonB I have connected the rejected signal, but when I close the QWizard, the two signals are emitted (finished and rejected).
@ivanicy
Yes, that is what the documentation states. I gave you the two ways to distinguish what you need to know here: either look at the parameter tofinished()or don't usefinished()at all and useaccepted()for your stuff andrejected()for nothing/the close box. -
Hello!
I am developing a QWizard and I need to know how can I ignore the "finished()" signal when I close the wizard with the X button. I have a slot connected to the finished() signal and I don't want to execute this slot when the wizard is cancelled.
Thank you very much
-
@ivanicy
Isn't theint resulttofinished()signal what you want to look at? Or use theaccepted()vsrejected()for your work (better)? I assume the close button causes the dialog to returnQDialog::Rejected. -
@JonB I have connected the rejected signal, but when I close the QWizard, the two signals are emitted (finished and rejected).
@ivanicy
Yes, that is what the documentation states. I gave you the two ways to distinguish what you need to know here: either look at the parameter tofinished()or don't usefinished()at all and useaccepted()for your stuff andrejected()for nothing/the close box. -
@ivanicy
Yes, that is what the documentation states. I gave you the two ways to distinguish what you need to know here: either look at the parameter tofinished()or don't usefinished()at all and useaccepted()for your stuff andrejected()for nothing/the close box. -
I ivanicy has marked this topic as solved on