Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top