Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.2.0
-
None
Description
It seems that QGraphicsScene should be usable when the application type isn't QApplication but merely QGuiApplication. The scene is very much useful on its own, if you want to render it on your own, instead of on a view.
Yet both QGraphicsScenePrivate::init() and QGraphicsScene::~QGraphicsScene() assume that qApp points to an instance of QApplication, and try to access qApp->d_func()->scene_list. A simple fix is to replace this access with:
if (qobject_cast<QApplication*>(qApp)) qApp->d_func()->scene_list....
I don't know whether moving QGraphicsScene & friends to the gui module would keep it binary compatible, but presumably that should be the long term goal?