Results 1 to 5 of 5

Thread: Registering field in Qt designer created Wizard

  1. #1
    Join Date
    Nov 2010
    Location
    Poland, Poznań
    Posts
    5
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Registering field in Qt designer created Wizard

    Hello.

    I have created a simple wizard for testing purpose. It has two pages with one QLineEdit field (du_email_f and du_name) on each one.
    My question is how do i register field?

    i have already tried:
    Qt Code:
    1. ui->page_1->registerField("test", ui->du_email_f);
    To copy to clipboard, switch view to plain text mode 
    and
    Qt Code:
    1. this->page(0)->registerField("test", ui->du_email_f);
    To copy to clipboard, switch view to plain text mode 
    Both lines were placed in main wizard clas file in constructor (not at the same time ofc.)
    In both cases i get "248: error: 'void QWizardPage::registerField(const QString&, QWidget*, const char*, const char*)' is protected within this context."

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Registering field in Qt designer created Wizard

    This is a method of QWizardPage so it can only be called from the context of the page and not the wizard.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    quain (5th December 2010)

  4. #3
    Join Date
    Nov 2010
    Location
    Poland, Poznań
    Posts
    5
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Registering field in Qt designer created Wizard

    Thanks for fast answer.
    Well, ill stick to my current method: Designing separated wizard pages and combinig them in no-ui wizard class.

    Thanks for you time Wysota.

  5. #4
    Join Date
    Feb 2011
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Registering field in Qt designer created Wizard

    Same problem here.

    Quote Originally Posted by wysota View Post
    This is a method of QWizardPage so it can only be called from the context of the page and not the wizard.
    Well that is obvious.
    But how is one supposed to set mandatory fields at all, when using the designer?
    You can't access the QWizardPages instances in code, because the code is auto-generated by the designer. If you put the code in there, it is lost the next time uic is run.

    If you can't modify the QWizardPages then a designer for QWizardPages is pointless, or am I missing something here?

    Regards,
    Philipp

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Registering field in Qt designer created Wizard

    You can promote pages to custom classes and implement those classes in code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 19th January 2011, 08:15
  2. Replies: 2
    Last Post: 2nd December 2010, 17:33
  3. Replies: 5
    Last Post: 7th May 2009, 14:29
  4. Replies: 2
    Last Post: 4th May 2009, 11:57
  5. complexe wizard with designer
    By patcito in forum Qt Programming
    Replies: 4
    Last Post: 27th June 2006, 22:48

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.