Hi,

I have a wizard with 4 Pages.
The first page is an "selector" page where the user can define which operation should be taken. The page contains simple QCommandLinkButtons. When clicking on one of these buttons, the page uses
Qt Code:
  1. self.wizard().setStartId()
  2. self.wizard().restart()
To copy to clipboard, switch view to plain text mode 
to set the start index and reset the wizard to the corresponding page.

But if I do so, the layout of the QWizardPage is broken and everything can be scaled down to a height of 0 (only the window title remains).
The WizardPage itself is ok, I use the widget in different places of the application.

If I call restart() again, everything is fine, so I came up with this code that works for me:
Qt Code:
  1. def _onButtonClicked(self, button: QAbstractButton):
  2. if button == self.newRechtsgrundlageButton:
  3. self.wizard().setStartId(WizardPages.Page1.value)
  4. else:
  5. self.wizard().setStartId(WizardPages.Page2.value)
  6. self.wizard().restart()
  7. # I don't know why but we have to restart twice, otherwise the window is broken
  8. self.wizard().restart()
To copy to clipboard, switch view to plain text mode 

Is this a bug in Qt?
I want to call restart() because I don't want to be able to go back to this selector page as soon as the user choose an option.