Results 1 to 7 of 7

Thread: button and lineEdit reinstall in stackedWidget

  1. #1
    Join Date
    Dec 2013
    Posts
    20
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4

    Default button and lineEdit reinstall in stackedWidget

    Hello i have button(not enable) and lineEdit in stackedWidget page.After work stackedwidget page(button is enable now) , How can i clear lineEdit and button is not enable.I mean how can i reinstall page initial setting.

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

    Default Re: button and lineEdit reinstall in stackedWidget

    Execute:
    Qt Code:
    1. ui->lineEdit->clear();
    2. ui->pushButton->setEnabled(false);
    To copy to clipboard, switch view to plain text mode 
    Or did I miss the point of your question altogether?

  3. #3
    Join Date
    Dec 2013
    Posts
    20
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4

    Default Re: button and lineEdit reinstall in stackedWidget

    This is a way for One lineEdit and button. But if have 3 lineEdits , 2 button and 3 comboBox(set initial index) , any easy way?

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

    Default Re: button and lineEdit reinstall in stackedWidget

    You are looking for an easier way than 8 straightforward function calls?

  5. #5
    Join Date
    Dec 2013
    Posts
    20
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4

    Default Re: button and lineEdit reinstall in stackedWidget

    Im looking some widgets return initial setting runtime

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: button and lineEdit reinstall in stackedWidget

    You can of course save all properties of all widgets at start time and then apply them again for reset.

    Probably below 100 lines of code.

    Explicitly setting the target state as suggested by ChrisW67 would be easier, but of course your choice.

    Cheers,
    _

  7. #7
    Join Date
    Dec 2013
    Posts
    20
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4

    Default Re: button and lineEdit reinstall in stackedWidget

    Thanks for all helping

Similar Threads

  1. Replies: 3
    Last Post: 23rd June 2013, 17:01
  2. Replies: 2
    Last Post: 6th June 2011, 10:40
  3. OS X 10.6 manual uninstall + reinstall
    By hureka in forum Installation and Deployment
    Replies: 0
    Last Post: 23rd March 2010, 00:38
  4. How to enabled button, when i changed lineedit`s text ?
    By newermind in forum Qt Programming
    Replies: 8
    Last Post: 13th August 2009, 09:57
  5. Hiding stackedWidget "button"[solved]
    By maverick_pol in forum Qt Programming
    Replies: 0
    Last Post: 21st April 2009, 19:37

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.