Assembling QWizardPages with PySide
-
Hi,
my problem is as follows.
I would like to have aQWizard
comprising severalQWizardPage
s that might later be traversed in a non-linear sequence. I am using PySide6.I created the
QWizardPage
s in Qt Designer as separate UI files and converted them to corresponding Python files using pyside6-uic. Then I created separate classes, each of them inheriting from one of those generatedQWizardPage
s and including custom code.
I also created theQWizard
in Qt Designer, converted the UI file to a Python file and created a class that inherits from this generated class.Now the problem comes in: I am not able to assemble the inheriting
QWizardPage
s in the inheritingQWizard
, theQWizard
just never gets started.
Since I wish to define the order of theQWizardPage
s myself, I usesetPage()
to set instances of my inheritingQWizardPage
classes with their position in the inheritingQWizard
class.My question, first of all, is whether assembling a
QWizard
in this way is even possible since I only found examples loading the UI files for theQWizardPage
s directly without converting them.
However, I am also not sure if I first need to define placeholders in theQWizard
UI file in Qt Designer to promote aQWizardPage
. I guess, this should not be necessary, this seems to be another way of assembling aQWizard
to have the possibilty of accessing slots/signals from theQWizardPage
s inside Qt Designer. -
@mister-pyside
Hello and welcome.I'm afraid I'm not sure what you asking/saying, but: do you mean at design-time you have separate pages and you have not set up for/created any pages in the
QWizard
? You should just be able to callQWizard::addpage()
orQWizard::setPage()
to add existing widgets as pages at run-time?I think you are saying this in
Now the problem comes in: I am not able to assemble the inheriting QWizardPages in the inheriting QWizard, the QWizard just never gets started.
Since I wish to define the order of the QWizardPages myself, I use setPage() to set instances of my inheriting QWizardPage classes with their position in the inheriting QWizard class.
In which case show your runtime code, as all of this should work, and I don't know what you mean by "the QWizard just never gets started".