How to set a QWidget inside of a QDockWidget as the central widget in that QDockWidget?
-
how to set a QWidget inside of a QDockWidget as the central widget in that QDockWidget?
@
QWidget* ui->qwidget = qwidgetdock->centralWidget();
@qwidget is the Qwidget that i want as the centralWidget as qwidgetdock.
qwidgetdock is the Qwidgetdock that I want as it centralWidget.
But doesn't.
Please Help Me ;). -
For starters this looks just plain wrong:
@QWidget* ui->qwidget = @
What is that suppose to mean? You can't declare members outside of a class declaration in C++.I'm not sure if I understand you correctly but if you just want to insert a widget into the dock, there's "QDockWidget::setWidget()":http://qt-project.org/doc/qt-5.0/qtwidgets/qdockwidget.html#setWidget method.