[Qt-interest] QWizardPage fields registered globally?
Mike Davis
mike at miketdavis.blogsite.org
Wed Jan 13 04:09:47 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Zack,
Without seeing your code, I'd say the simplest solution is to
reimplement isComplete() for each of your wizard page classes and be
sure any input changes emit completeChanged(). It's a smidgen more work
to code up input validation instead of relying on mandatory fields but
it probably will offer more flexibility.
Mike Davis
On 1/12/2010 3:29 PM, Zack Galbreath wrote:
> Hi list,
>
> I'm using Qt 4.6 to build a QWizard of four pages. I need to be able to
> control when the back/next/finished buttons are enabled, so I subclassed
> QWizardPage and made use of the registerField() method. My problem is
> that if I register a required field on page #4 it prevents the "next"
> button on page #1 from ever being enabled. Why do the registered fields
> of page #4 have anything at all to do with page #1?
>
> I have a hunch it's because the properties I'm registering belong not to
> the individual QWizardPages, but to the parent QWizard itself. Here's a
> code snippet from my first page to illustrate. In this example,
> "InputFileName" is a property of MyWizard.
>
>
> void MyIntroPage::RegisterFields()
> {
> MyWizard *wiz = static_cast<MyWizard*>(this->wizard());
> this->registerField("InputFileName*", wiz, "InputFileName",
> SIGNAL(inputChanged()));
> }
>
>
> Normally I try to do a better job of encapsulating my code, but Designer
> assigned all my widgets to be children of the QWizard, as opposed to the
> separate QWizardPages. Does anyone have any suggestions on how to setup
> different required fields on each page of a QWizard?
>
> TIA,
> -Zack
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
iEYEARECAAYFAktNOXsACgkQyv8e+QfNYNtLtgCgjKpt33X8hPlj9sk23kMbsx+E
+8UAnApHbYDt6OY0SppyEe/JbyJfGay+
=FFFM
-----END PGP SIGNATURE-----
More information about the Qt-interest-old
mailing list