[Qt-qml] Using QML canvas from C++, like QGraphicsView

Ville M. Vainio vivainio at gmail.com
Tue Jan 18 15:50:41 CET 2011


Let's say we have a guy that wants to write a 2D game with C++. He
likes Qt, not OpenGL so much, and is considering two options - QGV and
QML. He is not interested in doing anything in Javascript, so he's
basically going to implement all the logic, animation etc. in C++
side. He still wants to reside on QML canvas so it will be simple to
extend the game with nice menus and secondary views. The glorious
QGraphicsScene speedups and OpenGL effects coming up in the pipeline
also fascinate our protagonist.

So, he will basically be manipulating all the QML elements by
discovering the QDeclarativeItem's from the QML tree and fiddling with
their properties directly. Or something.

How bad a performance hit would this be, compared to just using
QGraphicsView? Would it be in any way signifant?

(Let's forget all the hacks where you create a QGV scene and embed it
inside QML for the purposes of this discussion)

-- 
Ville M. Vainio @@ Forum Nokia


More information about the Qt-qml mailing list