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 the QStackedWidget and returns the index position. Ownership of widget is passed on to the QStackedWidget.
    If the QStackedWidget is empty before this function is called, widget becomes the current widget.
    See also insertWidget(), removeWidget(), and setCurrentWidget().

    From the Qt Help manual.
    Also, you can show some code for here!


  • Lifetime Qt Champion

    Hi,

    Why do you want to put a QDockWidget in a QStackedWidget ?

    QMainWindow already handles stacking of several QDockWidgets.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.