Qt 6.11 is out! See what's new in the release
blog
QVBoxLayout::setStretchFactor dosen't work
-
@Limer Those stretch factors are nowhere near being realized in that size of a window. With a 1 you are saying basically you want a minimum widget stretch of 1 and the other is 4. Your window is so big that these would be nowhere near being used. It looks like it's behaving as expected.
What exactly are you trying to do? There's probably another way to go about what you are wanting. My guess is you are trying to compress the QLabels so they appear in a tight single spaced section ... if that's the case you just need to add column stretches, i.e.
gLayout1->setColumnStretch(0,1);andgLayout1->setColumnStretch(1,1);. I'm guessing a bit here, I very rarely use grid layouts much preferring vbox and hbox to form up my "grid".
