Results 1 to 8 of 8

Thread: delete/add layout, or modify existing layout?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2007
    Location
    Rakovnik, Czech Republic
    Posts
    175
    Thanks
    43
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default delete/add layout, or modify existing layout?

    I have a QHBoxLayout that contains QWidgets: a label and some buttons. Along the bottom of my application are 6 QPushButtons ("MainButtons"). When I hit the first MainButton, I want the QHBoxLayout to contain a label and 4 buttons. When I hit the second MainButton, I want the label and 4 buttons in the QHBoxLayout to disappear, and be replaced with a different label and different buttons that will have different properties/functions.

    How should I go about this? Should I create 6 separate QHBoxLayout objects--each containing its unique label and buttons--and hide/show them depending on which MainButton is pushed? Or should I create a single QHBoxLayout, and removeWidget/addWidget depending on which MainButton is pushed?
    Last edited by vonCZ; 13th June 2007 at 18:55.

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.