kistmaximum
9th June 2012, 14:20
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.
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();
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:
http://img6.imagebanana.com/img/3qnusvnx/qsplitter.png
How can I keep the widgets inside the mainwindow?
Thanks for the support.
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.
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();
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:
http://img6.imagebanana.com/img/3qnusvnx/qsplitter.png
How can I keep the widgets inside the mainwindow?
Thanks for the support.