Results 1 to 3 of 3

Thread: How to change the distribution of the mainwindow at runtime.

  1. #1
    Join Date
    Apr 2011
    Location
    Palma de Mallorca, Islas Baleares, Spain
    Posts
    24
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Question How to change the distribution of the mainwindow at runtime.

    Hello!

    I'm new in QT. I'm using eclipse CDT (programming in C++) and using the GUI project (.ui). First of all, I create a main window with two push buttons. I would like that when you click on one of two buttons change the entire contents of the window (and the buttons disappear). This new content will have an image and some push buttons, but that's another thing.

    What's the best way to do that? I think that I could change the layout when the button is pressed. Perhaps I could use frames. ¿Any ideas?

    Thanks in advance.

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

    Default Re: How to change the distribution of the mainwindow at runtime.

    QStackedWidget perhaps

  3. #3
    Join Date
    Apr 2011
    Location
    Palma de Mallorca, Islas Baleares, Spain
    Posts
    24
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: How to change the distribution of the mainwindow at runtime.

    Quote Originally Posted by ChrisW67 View Post
    I'm going to try it.

    Thanks!!

Similar Threads

  1. How to change QMainWindow size at runtime?
    By myfifth in forum Newbie
    Replies: 11
    Last Post: 10th January 2011, 07:18
  2. QToolbar - change icon at runtime ?
    By pl01 in forum Qt Programming
    Replies: 6
    Last Post: 18th November 2010, 18:51
  3. Replies: 6
    Last Post: 5th August 2009, 11:40
  4. Change QPixmap image at runtime
    By Qt Coder in forum Qt Programming
    Replies: 12
    Last Post: 30th March 2009, 13:37
  5. how change language at runtime?
    By mattia in forum Newbie
    Replies: 3
    Last Post: 14th November 2007, 19:36

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.