PDA

View Full Version : QWizard and nextId() question



Splinter
18th May 2009, 11:40
Hi All,

I'm using QWizard class for showing the dialogs sequence and it works just fine.
But now I have request to perform some non-interactive silent actions between dialogs. Initially I planned to use nextId() method for this. I already use this method for controlling the dialog sequence so I thought that running some actions before returning next dialog ID is ok. But then I realize that nextId() method called not only when customer press "next" but at least several times more. This is not good since actions should be performed only once.
Do anyone know the solution for such task? I'm also thinking about validateCurrentPage() method to this but documentation do not recommend to re-implement this method.

thanks in advance

wysota
18th May 2009, 21:02
Use QWizardPage::initializePage().

Olaf69
24th February 2014, 15:32
Hello,

I just came across this problem, and found that QWizard::validateCurrentPage() (http://qt-project.org/doc/qt-4.8/qwizard.html#validateCurrentPage) perfectly fits this need.
In my case, I needed to perform a time-spending operation, possibly canceled by the user.

Best regards

wysota
25th February 2014, 11:35
Hello,

I just came across this problem, and found that QWizard::validateCurrentPage() (http://qt-project.org/doc/qt-4.8/qwizard.html#validateCurrentPage) perfectly fits this need.
In my case, I needed to perform a time-spending operation, possibly canceled by the user.

Best regards

It depends whether you want to do the validation in the "old" or "new" page.