[Qt-interest] QWizard
Brad Pepers
brad at linuxcanada.com
Mon Jan 4 02:56:21 CET 2010
It would be nice in QWizard to have a validatePage(int id) just like there is with initializePage and cleanupPage. With it, I can make my wizard work with the code in my QWizard sub-class instead of spread out to other classes but as it is now to do validation I have to implement QWizardPage sub-classes which I find less clear. Also having it would be orthogonal to the initializePage(int id) and cleanupPage(int id) already in QWizard.
As another point, the cleanupPage method seems to be poorly named and I'm not quite sure I even understand its purpose. It only gets called when you click on Back but not when you click on Next. So what would you want to do special in that case? From the name it appeared to me like it should be called every time you leave a page instead of just when Back is pressed. A name like backPage would be more descriptive.
It would be handy to have a method called at the end of each page to do some work. I can't use nextId since its const and the work I'm doing usually changes things. If validatePage(int id) was added though, that would do the trick. I would just like a place to do some work on leaving the current page.
Also right now if I return a page in nextId that has already been visited, it doesn't work and I see a warning on the command line. Any thoughts to making this just roll back the history to that page so that it works? I have a wizard where you pick an option and some of the options lead you out of the wizard but some do work and then you get back to the options page. Right now this doesn't work anymore due to this limitation but it seems reasonable that if I've returned some page id that has been visited, allow it and roll back the history to that point instead of just ignoring it.
Finally I notice on the Mac when the wizard is open there is no standard close window button in the top left and the wizard buttons also doesn't include anything to exit or cancel. How are you supposed to let the user exit the wizard??? BTW this is all on Snow Leopard and Qt 4.6.0 using 32 bit Carbon.
Just some observations in switching code over from the QWizard in Qt 3.x.
--
Brad
More information about the Qt-interest-old
mailing list