Qt Quick vs Graphics View Framework (QGraphicsScene)

I looked at the new Qt5 and Qt Quick features and don’t understand how this differs from the Graphics View Framework (QGraphicsScene) feature. It uses QML, but beyond that:

  • Can Qt Quick do what QGraphicsScene cannot? For example, particle effects .
  • Is Qt Fast Faster Than QGraphicsScene? “Faster” means more FPS when displaying 1000 moving elements?

I am making a tower defense game and using QGraphicsScene, and now I am wondering if I should switch to Qt Quick.

+6
source share
1 answer

Qt5 and Qt Quick 2 should give a good performance boost thanks to the "scene graphics", which is the main engine and is mainly written from scratch for Qt Quick of Qt5, to fully use OpenGL and have a high frame rate as a design goal from the very beginning.

In addition to performance, I think it’s a great feature that you can describe the GUI, transitions, animations, and all this, which is much better with QML. There's some kind of learning curve written by a declarative graphical interface that is very different from writing more direct C ++ code to do such things, but it's worth it.

In Qt4, I don’t think that QML is going to give any advantage in the form, since I think (now I didn’t check) the QGraphicsView is actually written there.

So to summarize: Go to Qt5 and Qt Quick2 and learn QML to define a GUI. Have a C ++ game logic for performance (tower defense games can have quite a few things going on as a last resort).

Edit: A blog (the old one, maybe a little outdated) about why the graph graph implementation was created: http://blog.qt.io/blog/2011/05/31/qml-scene-graph-in-master/

+7
source

Source: https://habr.com/ru/post/943836/


All Articles