I create a page named TestPage, this is its constructor:
Qt Code:
  1. TestPage::TestPage(QWidget *parent)
  2. :QWizardPage(parent)
  3. {
  4. QPushButton *button = new QPushButton("Start");
  5. QVBoxLayout *layout = new QVBoxLayout;
  6.  
  7. layout->addWidget(button);
  8. setLayout(layout);
  9. }
To copy to clipboard, switch view to plain text mode 
When I run it, the button appears on the page. However, if I do the following…
Qt Code:
  1. TestPage::TestPage(QWidget *parent)
  2. :QWizardPage(parent)
  3. {
  4. QPushButton *button = new QPushButton(this);
  5. }
To copy to clipboard, switch view to plain text mode 
…the button is invisible. So, to show the page contents do I need to use layout management? Or is there another way to implement displaying a button or other widgets without using layout management ?

Thanks in advance