WGridLayout does not work inside of WStackedWidget
The vertical rescaling of GridLayout does not work if located inside of WStackedWidget.
In the attached example two things are strange:
- The size of "view"
object is sometimes big, sometimes small. Press reloadit is random.
2. The heights of the integrated TextItems are always small. In the same example without WStackedWidget, they share the window height 50:50.
Tested with 3.4.1 on Firefox and Chrome.
Updated by Roel Standaert over 3 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
Hm, so this seems to be the case if you're using a
WVBoxLayout (which uses CSS flex), and the issue isn't there when:
- You're using two
WVBoxLayouts instead (both using flex)
- You're giving the
view100% width and height.
Now, I'm not sure if those first two cases are by design, or it just happens like that. Normally, a
WStackedWidget with a
WContainerWidget in it is just a
<div> in a
<div>. There's no rule there that says the inside div is the same size as the outside div. You can see that if you're not using layouts, and you have a
WContainerWidget inside of a
WStackedWidget of a certain size, that widget does not automatically fill the
WStackedWidget. I'm assigning this to Koen so he can shed some light on how this is actually supposed to work.