开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜