How to add a QDockWidget to QGraphicsScene?
Is it possible to add a DockWidget to my QGraphicsScene 开发者_开发百科scene .? If yes how to do it.
The best way I see to achieve this would be to create a QMainWindow, set your graphicsScene as the central widget with
QMainWindow::setCentralWidget(QWidget* widget);
After that, simply add your QDockWidget in the QMainWindow with
QMainWindow::addDockWidget(Qt::DockWidgetArea area, QDockWidget* dockwidget);
This option also allows you to add toolbar(s) or menu(s) easily.
Hope this helps.
精彩评论