QStackedLayout and QStackedWidget always taking all available space
General and Desktop
1
Posts
1
Posters
1.1k
Views
2
Watching
-
wrote on 17 Jun 2015, 17:56 last edited by
I'm adding permanent widgets to my QMainWindow's status bar. When I add a label or some widget that I create deriving from QWidget, they only take the space needed, and that's exactly how I wanted it.
When I tried a QStackedWidget, it would always take the entire space available. Then I tried to change it's SizePolicy to no avail. Then I tried to create a QWidget with a QStackedLayout and got the same result. I tried even to derive QStackedLayout and change some stuff and nothing..
What do I need to do for the QStackedLayout/QStackedWidget to take only the space it needs?
Thanks
1/1