Results 1 to 2 of 2

Thread: Multi-page application with Qt Designer

  1. #1
    Join Date
    Sep 2015
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Multi-page application with Qt Designer

    Hi, am totally newbie in gui programming using Qt.
    I know how to create a single page program using the Qt Designer, but how can I create a multi page application ?
    I've watched a ton of tutorials but they all only show how to create a single page application...

    I want to create an application which will have a combo box with options "Hello" and "Bye". The combo box is in top of the main window.
    When I select the "Hello" option on combo box, a "Hello World" push button will appear on the bottom of the main window.
    When I select the "Bye" option on combo box, a "Bye World" push button will appear on the bottom of the main window(and the "Hello" button and all other stuff except the combo box must disappear).
    So, basically, the content of the main window depends on which option is checked on the combo box.

    How can I do that using the Qt Designer ?

    (I'm using Qt4, PyQt and QT Designer)

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,418
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Multi-page application with Qt Designer

    You use a QStackedWidget as part of your top level UI. Then you put the different page UIs into it.
    Then you connect the combobox's currentIndexChanged signal to the stackwidget's setCurrentIndex slot.

    Cheers,
    _

Similar Threads

  1. Multi page report with QTextDocument
    By H Aßdøµ in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2015, 00:45
  2. Create Multi-page GUI Using QT Designer
    By nprak in forum Newbie
    Replies: 2
    Last Post: 20th October 2014, 21:42
  3. Multi-page application and QStackedWidget
    By Mek82 in forum Qt Programming
    Replies: 10
    Last Post: 31st October 2010, 23:06
  4. multi page Application
    By ilpaso in forum Qt Programming
    Replies: 2
    Last Post: 3rd September 2010, 10:36
  5. Multi-Page PDF Output
    By igor in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2007, 05:10

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.