Render Qml efficiently on GraphicsView
My code is below.
How do I efficiently render qml on graphicsView? my animation qml is appearing very slow when rendered in QDeclarativeEngine. Is there a way to optimise it at the c++ level?
It was running ok at qml level.
int main(int argc, char *argv)
QApplication app(argc, argv);
OpenGLScene scene = new OpenGLScene;
// provides an environment for instantiating QML components
// encapsulates a QML component definition
QDeclarativeComponent component(&engine, QUrl::fromLocalFile("BounceAnimation.qml"));
// creates the graphics item for QML at the engine's root context
QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create());
// set position of item
"This":http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeview.html#details might help you.
Thanks Lukas for the reply.
Is there render performance difference comparing the QDeclarativeView with QDeclarativeEngine?
Also, i did the following but the qml rendering is still not smooth. Any other advices? anyone?