Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Assembling QWizardPages with PySide
Forum Updated to NodeBB v4.3 + New Features

Assembling QWizardPages with PySide

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 288 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mister-pyside
    wrote on last edited by
    #1

    Hi,

    my problem is as follows.
    I would like to have a QWizard comprising several QWizardPages that might later be traversed in a non-linear sequence. I am using PySide6.

    I created the QWizardPages 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 generated QWizardPages and including custom code.
    I also created the QWizardin 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 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.

    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 the QWizardPages directly without converting them.
    However, I am also not sure if I first need to define placeholders in the QWizard UI file in Qt Designer to promote a QWizardPage. I guess, this should not be necessary, this seems to be another way of assembling a QWizard to have the possibilty of accessing slots/signals from the QWizardPages inside Qt Designer.

    JonBJ 1 Reply Last reply
    0
    • M mister-pyside

      Hi,

      my problem is as follows.
      I would like to have a QWizard comprising several QWizardPages that might later be traversed in a non-linear sequence. I am using PySide6.

      I created the QWizardPages 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 generated QWizardPages and including custom code.
      I also created the QWizardin 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 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.

      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 the QWizardPages directly without converting them.
      However, I am also not sure if I first need to define placeholders in the QWizard UI file in Qt Designer to promote a QWizardPage. I guess, this should not be necessary, this seems to be another way of assembling a QWizard to have the possibilty of accessing slots/signals from the QWizardPages inside Qt Designer.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @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 call QWizard::addpage() or QWizard::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".

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved