Multiple windows in Qdockwidets with Qt

921 views Asked by At

I'm having some trouble creating a interface with Qt. i'd like to have a dock like the one in Qt Designer (cf below): Multiple subwindows that closable (or minimisable).

I found things like MainWindow::tabifyDockWidget but that's not exactacly what i'm looking for.

Does someone know how to make it ?

thx.

1

There are 1 answers

0
Matthieu Riegler On BEST ANSWER

I found the solution myself :

QDockWidget *dock = new QDockWidget(tr("Histogramme"), this);
histogram = new QWidget;
dock->setWidget(histogramme);
ui->menuWindow->addAction(dock->toggleViewAction());

A new dock must be created for each new "subwindow".