--- /Users/gabi/Work/dev/qt5-5.6/qtbase/examples/opengl/hellogl2/window.cpp 2015-11-24 16:37:22.000000000 -0800 +++ window.cpp 2016-05-05 18:05:49.000000000 -0700 @@ -49,6 +49,7 @@ #include #include #include +#include Window::Window(MainWindow *mw) : mainWindow(mw) @@ -58,6 +59,7 @@ xSlider = createSlider(); ySlider = createSlider(); zSlider = createSlider(); + xSlider->winId(); // BAHM! connect(xSlider, &QSlider::valueChanged, glWidget, &GLWidget::setXRotation); connect(glWidget, &GLWidget::xRotationChanged, xSlider, &QSlider::setValue); @@ -66,16 +68,19 @@ connect(zSlider, &QSlider::valueChanged, glWidget, &GLWidget::setZRotation); connect(glWidget, &GLWidget::zRotationChanged, zSlider, &QSlider::setValue); - QVBoxLayout *mainLayout = new QVBoxLayout; QHBoxLayout *container = new QHBoxLayout; - container->addWidget(glWidget); + QWidget *w = new QWidget; + w->setLayout(container); container->addWidget(xSlider); container->addWidget(ySlider); container->addWidget(zSlider); - QWidget *w = new QWidget; - w->setLayout(container); - mainLayout->addWidget(w); + QSplitter *splitter = new QSplitter(Qt::Horizontal); + splitter->addWidget(glWidget); + splitter->addWidget(w); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(splitter); dockBtn = new QPushButton(tr("Undock"), this); connect(dockBtn, &QPushButton::clicked, this, &Window::dockUndock); mainLayout->addWidget(dockBtn);