Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to catch FINISH button pressed signal in QWizard
I added a QWizard in my project using QT designer. I want to save/process values from different ages of my QWizard when user clicks Finish button on the last page of my QWizard.
I could not find signal related to QWizard default buttons (BACK, NEXT, FINISH etc). How can I catch the signal when user click FINISH button on my QWizard?
Vinorcola last edited by
I think it should be your last QWizardPage that do this work.
You can register any field from any page so their value is accessible to other pages. http://qt-project.org/doc/qt-5/qwizardpage.html#registerField
Then, your last page do the work.
Thanks for your reply.
I still can't see the concept implemented in pages created and added using QWizard. I am using QT Designer to create QWizard and add pages to the it.
I am NOT adding pages to my QWizard pragmatically.
Would you please post an example doing this?
You can use "button":http://qt-project.org/doc/qt-5/qwizard.html#button to get the exact button and then connect signal clicked to your slot.
So For eg in QWizard based class:
Thanks for your reply. It worked.
Assuming that wiz is your topWizard page.
@ QPushButton but = wiz.findChild<QPushButton>("qt_wizard_finish");
Edit : I missed the previous answer. Other answer is better. I just kept page open and answered it.