PDA

View Full Version : How to change a widget to other widget in layout?



Kevin Hoang
20th March 2010, 10:15
I have a form (widget form) on this form has 3 widgets: header, centralWidget, footer. A vertical layout to wrap them, like this:

__________________________________________________ ______________
|
| Header Widget contains Navigation To other forms
|_________________________________________________ ______________
|
|
|
| Central Widget
|
|
|
|_________________________________________________ ______________
|
| Footer Widget
|_________________________________________________ ______________

The footer and header widget are no changes, but Central Widget always change when users click any items of the navigation.

My question is: How to change the Central Widget to other widget when click on a button? Which classes helps me do this?

manmohan
20th March 2010, 10:27
try to use the Wizard or else try to change central widget when ever the button is clickedby using the SetCentralWidget function

Lykurg
20th March 2010, 10:55
See QStackedWidget.