PDA

View Full Version : qwizard and fields



GrahamLabdon
10th May 2011, 15:04
Hi
I have developed a QWizard with several pages and am passing entered data back to the wizard class via the 'field' mechanism.
All works well, except that one of the pages has a QPlainTextEdit widget.
I do not seem to be able to get the data transferred from this with the field mechanism.

Is there another way of achieving this?

In page code -
registerField("additionalEquipmentPlainTextEdit",ui.additionalEquipmentPlainTextEdit);

in wizard code -
field("additionalEquipmentPlainTextEdit").toString(); - ALWAYS RETURNS EMPTY STRING

Thanks

Graham

ChrisW67
10th May 2011, 23:38
You probably need to use the third and fourth arguments to QWizardPage::registerField() to tell Qt which property to read and a signal that indicates the property has changed. QPlainTextEdit is not listed as one of the known widgets.

Something like:


registerField("fieldName", myWidget, "plainText", "textChanged()");

GrahamLabdon
11th May 2011, 07:58
Thanks
Yep that got it working
sorry about the code tags - I'll remember next time