I have created two wizards , i want that when i clicked finish of one wizard another wizard gets opened.. Is there any way of connecting finish button of first wizard to 2nd wizard?? please help
Printable View
I have created two wizards , i want that when i clicked finish of one wizard another wizard gets opened.. Is there any way of connecting finish button of first wizard to 2nd wizard?? please help
signal/slot mechanism - pretty handy! ;)
finished slot on one wizard -> exec() / open() / show() slot on the next
as you said me to use signal and slots, it is giving me error..
no matching function for call to 'dynamic::connect(QWizard::WizardButton, const char [11], edges*, const char [11])'
code..
I am trying to connect finish button of dynamic to edge wizard..
Code:
//dynamic.h class dynamic : public QWizard { Q_OBJECT public: ~dynamic(){} }; //dynamic.cpp #include "dynamic.h" #include "edges.h" #include <QtGui> : QWizard(parent) { edges e; connect(FinishButton,SIGNAL(clicked()),&e,SLOT(e.show())); } //edges.h class edges : public QWizard { Q_OBJECT public: ~edges(){} public slots: void app_run(); }; //edges.cpp #include "edges.h" class QLineEdit; : QWizard(parent) { setOption(QWizard::NoBackButtonOnLastPage,true); setWindowTitle(tr("Edge Wizard")); } void edges::app_run() { this->show(); }
The first argument of connect() has to be an object instance, not an enum.
object instance pointer ;)