Results 1 to 3 of 3

Thread: qwizard and fields

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default qwizard and fields

    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",u i.additionalEquipmentPlainTextEdit);

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

    Thanks

    Graham

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qwizard and fields

    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:
    Qt Code:
    1. registerField("fieldName", myWidget, "plainText", "textChanged()");
    To copy to clipboard, switch view to plain text mode 
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  3. The following user says thank you to ChrisW67 for this useful post:

    GrahamLabdon (11th May 2011)

  4. #3
    Join Date
    Mar 2010
    Posts
    107
    Thanks
    22
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwizard and fields

    Thanks
    Yep that got it working
    sorry about the code tags - I'll remember next time

Similar Threads

  1. Parsing UDP datagram fields
    By catto in forum Qt Programming
    Replies: 7
    Last Post: 23rd February 2011, 20:16
  2. Replies: 4
    Last Post: 17th August 2010, 03:28
  3. QWizard fields and custom properties
    By HelLViS69 in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2010, 16:41
  4. QWizard - mandatory fields
    By slava in forum Qt Programming
    Replies: 12
    Last Post: 12th February 2008, 13:52
  5. tr() and static fields
    By drkbkr in forum Qt Programming
    Replies: 6
    Last Post: 5th June 2007, 16:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.