Guys,

I have QDialog that I want to put inside a QWizardPage, is this possible? I have tried testing it QDialog won't stay inside the wizard page . Is there any way I can manage to put this dialog inside the page?

Qt Code:
  1. #include "wizard.h"
  2.  
  3.  
  4. Wizard::Wizard(QWidget* parent)
  5. :QWizard(parent)
  6. {
  7. //ctor
  8. addPage(new firstPage(this));
  9. }
  10.  
  11. Wizard::~Wizard()
  12. {
  13. //dtor
  14. }
  15. void Wizard::accept(void)
  16. {}
  17.  
  18. firstPage::firstPage(QWidget* parent)
  19. :QWizardPage(parent)
  20. {
  21. //ctor
  22. setTitle(tr("Class Information"));
  23. setSubTitle(tr("Specify basic information about the class for which you "
  24. "want to generate skeleton source code files."));
  25. QHBoxLayout* lo = new QHBoxLayout();
  26. QDialog* dialog = new QDialog(this);
  27.  
  28. lo->addWidget(dialog);// i thought this will bring the dialog in the page
  29. dialog->show(); // i tried bypassing this but I can't see the dialog
  30.  
  31. QHBoxLayout* dlo = new QHBoxLayout(dialog);
  32. QPushButton* btn = new QPushButton("Aha",dialog);
  33. dlo->addWidget(btn);
  34.  
  35. setLayout(lo);
  36. }
To copy to clipboard, switch view to plain text mode 

this is my test code

baray98