I am using this function to open a wizard after clicking a button:
void Go::runWizardSlot()
{
QWizard wizard;
wizard.addPage(::createIntroPage());
wizard.setWindowTitle("Trivial Wizard");
wizard.show();
}
When I click on a button, this opens the dialog, but closes immediately. Here is the intro function:
QWizardPage *createIntroPage()
{
QWizardPage *page = new QWizardPage;
page->setTitle("Introduction");
QLabel *label = new QLabel("This wizard will help you register your copy "
"of Super Product Two.");
label->setWordWrap(true);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(label);
page->setLayout(layout);
return page;
}
Is there any function to keep it open?