I don't know how it works with a splitter but if you use one of the layouts, this details you have just mentioned can be controlled with stretches; this can be added either using a separate function or simply providing a second parameter in addWidget / addLayout. For instance, I want to divide a window into two horizontal regions. I want a bottom region to stay fixed whereas the upper one to be rescaled when the window is rescaled.
vBox
->addWidget
(new QLabel("Label 1"),
1);
QVBoxLayout* vBox = new QVBoxLayout;
vBox->addWidget(new QLabel("Label 1"), 1);
vBox->addWidget(new QListWidget);
To copy to clipboard, switch view to plain text mode
By default, QLabel will probably flow but in the middle but when you set QSizePolicy to Maximum it may be rescaled as well. You may also want the upper part to be stretched twice as much as the bottom one. Then you can coded this as follows
vBox
->addWidget
(new QLabel("Label 1"),
2);
vBox->addWidget(new QLabel("Label 1"),2);
vBox->addWidget(new QListWidget,1);
To copy to clipboard, switch view to plain text mode
I cannot test this code so I cannot be 100% sure it will work but it may help you figure out something. Also, there is a good tutorial about how to use Layouts.
Bookmarks