Results 1 to 4 of 4

Thread: Replace Original Interface with a new one

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2012
    Posts
    23
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Replace Original Interface with a new one

    I have an option menu and under it is original and replace with the code definition below for each option
    Qt Code:
    1. // code for original interface
    2. void MainWindow::on_actionOriginal_triggered()
    3. {
    4. ui->centralWidget->show();
    5. }
    6.  
    7. // code for replace original interface
    8. void MainWindow::on_actionReplace_triggered()
    9. {
    10. ui->centralWidget->hide();
    11. }
    To copy to clipboard, switch view to plain text mode 

    The original interface has three buttons and two line edits when the program is run. Now when the user clicks the replace option I want to replace the original interface with 2 buttons and a line edit. And when the user clicks the original option it's able to display the original interface again

    So how can I replace the contents of the original interface that was shown before with a new one?

  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: Replace Original Interface with a new one

    You already have a perfectly workable answer to this question in the first thread you opened on the topic.

Similar Threads

  1. Replies: 2
    Last Post: 6th January 2011, 12:56
  2. How to get the index of original SQL table?
    By Kode.Cooper in forum Qt Programming
    Replies: 0
    Last Post: 27th January 2010, 08:43
  3. turning widgets to original state
    By helvin in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2009, 08:35
  4. Replies: 3
    Last Post: 20th September 2009, 23:03
  5. Replies: 3
    Last Post: 3rd May 2009, 08:58

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.