Reputation: 3130
In Qt, I have a QDialog
with two QTreeView
objects. I want one of them to always be half the height of the other one, and maintain this when I resize my dialog. I add the in a QVBoxLayout
.
How can I do this?
Upvotes: 1
Views: 112
Reputation: 73304
You can use the QVBoxLayout::addWidget() method's stretch
argument, like this:
layout->addWidget(smallWidget, 1);
layout->addWidget(bigWidget, 2);
Upvotes: 4