How Do I add dockwidget in stackedwidget?
-
As we know only QMainWindow supports dockwidget.
I want to add this whole widget or window in stackedwidget. But as I am not able to .
-
Hi, friend. Are you try
addWidget
?int QStackedWidget::addWidget(QWidget *widget)
Appends the given widget to theQStackedWidget
and returns the index position. Ownership of widget is passed on to theQStackedWidget
.
If theQStackedWidget
is empty before this function is called,widget becomes the current widget
.
See alsoinsertWidget()
,removeWidget()
, andsetCurrentWidget()
.From the Qt Help manual.
Also, you can show some code for here! -
Hi,
Why do you want to put a QDockWidget in a QStackedWidget ?
QMainWindow already handles stacking of several QDockWidgets.