Results 1 to 5 of 5

Thread: Carry out processing as soon as a QWizardPage is visible?

  1. #1
    Join Date
    Jun 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Carry out processing as soon as a QWizardPage is visible?

    I have a series of QWizardPages set up to ask a user for a set of information. Once completed there is a final page with a Commit. Once the Commit is pressed I want to display a series of test steps to the user within the wizard page and then allow Finish to be pressed. Given the steps needed are very linear it seemed that this was an appropriate way to do it.

    However when Commit is pressed I cannot find the function/signal that shows a page is displayed. showEvent() and initializePage() both seem to be called before the page is displayed to the user.

    How can I determine that the page is displayed so that I can carry out the processing?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Carry out processing as soon as a QWizardPage is visible?

    You want them to press Commit and display a series of pages to them in a linear fashion. Seems that you simply want to put the pages into the QWizard, with the final page carrying a Finish button.

  3. #3
    Join Date
    Jun 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Carry out processing as soon as a QWizardPage is visible?

    What I want is that on page 4, say, is that it says on the wizardpage something like. All test settings chosen, press commit to run test. It then goes to the next page and runs the tests, displaying progress as it goes until the test is complete at which point the Finish button (or next) is then available to be pressed.

    However when I switch to the new page the functions I mentioned happen before the page is shown. Perhaps I am looking at doing it in the wrong way or place within the wizard?

  4. #4
    Join Date
    Jun 2011
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Carry out processing as soon as a QWizardPage is visible?

    Quote Originally Posted by firedragon View Post
    What I want is that on page 4, say, is that it says on the wizardpage something like. All test settings chosen, press commit to run test. It then goes to the next page and runs the tests, displaying progress as it goes until the test is complete at which point the Finish button (or next) is then available to be pressed.

    However when I switch to the new page the functions I mentioned happen before the page is shown. Perhaps I am looking at doing it in the wrong way or place within the wizard?
    Hello Everyone,

    Does anyone have solution for this problem. Please reply.

  5. #5
    Join Date
    Jun 2011
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Carry out processing as soon as a QWizardPage is visible?

    Hi All,

    I found a solution for this problem.

    We have to overwrite the showevent of QWizardPage and then use QTimer::singleshot.
    Below is the sample code.

    void CSampleWizardPage::showEvent(QShowEvent *event)
    {
    QWizardPage::showEvent(event);
    QTimer::singleShot(50, this, SLOT(startRequest()));
    return;
    }

    Please let me know if this solution is useful to you...

Similar Threads

  1. [Help]: How to make a QWizardPage unvisited?
    By dongli in forum Qt Programming
    Replies: 3
    Last Post: 13th July 2014, 19:41
  2. QWizardPage
    By GrahamLabdon in forum Qt Programming
    Replies: 1
    Last Post: 29th April 2011, 12:08
  3. Qt Designer Cannot add controls to QWizardPage
    By 27Loco in forum Qt Tools
    Replies: 1
    Last Post: 17th July 2010, 23:58
  4. [Help]: How to make a QWizardPage unvisited?
    By dongli in forum Qt Tools
    Replies: 1
    Last Post: 29th June 2009, 16:12

Bookmarks

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.