Qt layout problem.

Posted by Lukasz Lew on Stack Overflow See other posts from Stack Overflow or by Lukasz Lew
Published on 2010-04-06T10:41:22Z Indexed on 2010/04/06 11:03 UTC
Read the original article Hit count: 182

Filed under:
|
|

I have a following Qt code:

QVBoxLayout* box = new QVBoxLayout;
label = new QLabel(); // will be set later dynamically
box->addWidget (label);

Text in label will be set later. The problem is that when label resizes, it resizes QVBoxLayout, and it resizes other neighboring widgets. I don't want to make a label or layout fixed width. Because I want them to resize with a whole window.

Is it possible to tell a widget to take all the place that it has in a layout, but not more?

© Stack Overflow or respective owner

Related posts about qt

Related posts about c++