Results 1 to 7 of 7

Thread: Disabling the buttons in QWizard

  1. #1
    Join Date
    Sep 2008
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Disabling the buttons in QWizard

    iam using the QT4 version...


    Here my question is how to disable the buttons in intermediate PAges of a QWizard???

  2. #2
    Join Date
    Sep 2008
    Posts
    60
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Disabling the buttons in QWizard

    have you tried calling QWizard::button(WizardButton which) and then
    button->setEnabled(false)?

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Disabling the buttons in QWizard

    Please read the detailed description of QWizardPage docs. QWizardPage provides five virtual functions that can be reimplemented to provide custom behavior.
    J-P Nurmi

  4. The following user says thank you to jpn for this useful post:

    yuriry (12th October 2008)

  5. #4
    Join Date
    Sep 2008
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Disabling the buttons in QWizard

    Quote Originally Posted by yuriry View Post
    have you tried calling QWizard::button(WizardButton which) and then
    button->setEnabled(false)?

    ya i tried this, but that results in error that the button cannot be used as a function...
    then the code you sent will work only in Q3Wizard and not in Qt4

  6. #5
    Join Date
    Apr 2008
    Posts
    12
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Disabling the buttons in QWizard


  7. #6
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Disabling the buttons in QWizard

    Ie to disable CustomButton1 :
    Qt Code:
    1. wizard()->setOption(QWizard::HaveCustomButton1, false);
    To copy to clipboard, switch view to plain text mode 

  8. #7
    Join Date
    Jun 2008
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Disabling the buttons in QWizard

    hey,

    in Qt4 there are some methods to handle the standard buttons of QWizard.

    setCommitPage( true) - disables Back button
    setFinalPage(true) - shows Finish Button, not Next, if isComplete returns true

    implement isComplete() - to disable/enable Next or Finish Button
    reimplement isFinalPage() - to show Finish Button

    Read docs to do more fine things

    Bye

Similar Threads

  1. Disabling the buttons in QWizard
    By divya balachandran in forum Qt Programming
    Replies: 1
    Last Post: 17th September 2008, 18:52
  2. Disabling Wizard Buttons in a QWizard
    By JimDaniel in forum Qt Programming
    Replies: 1
    Last Post: 30th October 2007, 17:53

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.