Question

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.

Was it helpful?

Solution

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".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top