Results 1 to 2 of 2

Thread: Weird QWizard restart problem [pyQt]

  1. #1
    Join Date
    Feb 2013
    Qt products

    Default Weird QWizard restart problem [pyQt]


    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.

  2. #2
    Join Date
    Jan 2008
    Alameda, CA, USA
    Thanked 750 Times in 740 Posts
    Qt products
    Windows Android

    Default Re: Weird QWizard restart problem [pyQt]

    Is this a bug in Qt?
    Almost certainly no. You probably have bugs in the way you have designed your wizard or its pages or its navigation.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 0
    Last Post: 31st March 2013, 22:17
  2. Weird problem
    By CactusPie in forum Newbie
    Replies: 2
    Last Post: 23rd November 2012, 22:37
  3. weird focus problem with pyqt
    By Radu in forum Qt Programming
    Replies: 0
    Last Post: 29th July 2011, 17:32
  4. QWizard signal problem
    By oguzy in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2008, 11:43
  5. Replies: 1
    Last Post: 10th August 2008, 19:55

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.