[Qt-interest] Verify email on server in QWizard
Malyushytsky, Alex
alex at wai.com
Tue Jun 28 04:00:23 CEST 2011
>>It was extremely painful and frustrating to use. The history and cleanup mechanism kept getting in the way. It's a shame there is nothing simpler that just displays the pages in the correct system layout and images, without the extra crap!
Tony.
It is a shame Tony has not implemented his brilliant idea in the life yet.
While we wait, if problem only in what QWizard::nextId () returns,
you can subclass QWizard and make it return other value.
I am not sure the problem is requires changing nextId () return though.
From what you explained I would override
bool QWizard::validateCurrentPage () instead and if it is going to return false,
set text in the label.
And you still can use QDesigner. Either use promotion feature or write your own plugin.
It take a second to promote widget, it takes longer to write your plugin, especially first time,
but do it once and it will never be hard to you again.
All the strength in C++ comes from the ability to override virtual functions.
Don't let your desire to use "pre-defined" classes to prevent you from writing efficient and easy maintainable code.
Regards,
Alex
-----
Original Message-----
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Tony Rietwyk
Sent: Monday, June 27, 2011 6:25 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Verify email on server in QWizard
> Sent: Tuesday, 28 June 2011 10:46 AM
>
> Hello.
>
> I'm creating dialog for registration of user. In one page
> user must enter
> his email. When he clicks on Next button, program must send email to
> server and if email not exists in base, must go to next page.
> If email
> exists, QWizardPage must print error message in QLabel. How
> can I do this.
> I watch LicenseWizard in Tutorials, nextId function just
> returns Id of the
> next page.
>
> Best regards,
> Nick.
Hi Nick,
I use a QWizard dialog built in the designer, so no wizard page overrides. I use nextId to setup each page, validateCurrentPage to do validation of fields, and a currentIdChanged slot to do the actual work depending on the page transition. I used an in-progress page while accessing the network.
It was extremely painful and frustrating to use. The history and cleanup mechanism kept getting in the way. It's a shame there is nothing simpler that just displays the pages in the correct system layout and images, without the extra crap!
Good luck!
Tony.
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list