Pergunta

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.

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top