Solved QStackedWidget: stretches to the full app screen
-
Hi!
On the central widget, there is a QFrame and QStacedWidget.
When I apply a horizontal layout, QStackedWidget stretches to the full app screen.
No QFrame visible.
I need a QFrame on one side of the interface and a QStackedWidget on the other.
How to fix this?Thanks!
-
@sitesv QFrame is empty I guess?
You can play with https://doc.qt.io/qt-5/qwidget.html#sizePolicy-prop -
@jsulm said in QStackedWidget: stretches to the full app screen:
QFrame is empty I guess?
For an example, I added a label to the qframe. And after applying layout the situation is the same.
I set size policy for QFrame as Fixed for H. Situation is the same.
Only after setting a minimum width size problem was fixed.
This situation is the same also for qtabwidget.
But for qwidget it is ok from the beginning. -
Hi
You can ask the layout to share space equally