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?
Bookmarks