Hi all,
I have a mainwindow with multiple widgets and a horizontal layout.
I tried to add a QSplitter to be able to resize them on runtime.
splitter->setChildrenCollapsible(false);
splitter->setOrientation(Qt::Horizontal);
splitter->addWidget(ui->listWidget);
splitter->addWidget(ui->widget);
splitter->addWidget(ui->pushButton);
splitter->addWidget(ui->scrollArea);
splitter->show();
QSplitter splitter = new QSplitter;
splitter->setChildrenCollapsible(false);
splitter->setOrientation(Qt::Horizontal);
splitter->addWidget(ui->listWidget);
splitter->addWidget(ui->widget);
splitter->addWidget(ui->pushButton);
splitter->addWidget(ui->scrollArea);
splitter->show();
To copy to clipboard, switch view to plain text mode
It works fine, except that the mentioned widgets 'pop out' of the mainwindow, leaving an empty mainwindow with only the status and menubar behind.
Take a look:

How can I keep the widgets inside the mainwindow?
Thanks for the support.
Bookmarks