Update on Qt Quick 3D for Qt 4.x

Note: This is a solution for those who want to use Qt Quick 3D against Qt 4.x. We won't need this once we port Qt Quick 3D to Qt 5 where scene graph based  QSGView is used.

When the first preview of Qt Quick 3D was released, it was not possible to run QML 3D on Symbian devices. We now have fixed this issue by creating a specialized declarative view class. This new class is called QDeclarativeView3D and used when creating Qt3D applications. It replaces the standard raster viewport with an OpenGL capable viewport suitable for rendering 3D content. I.e. It gives the same effect as calling qmlviewer -opengl.

As this is a new class, it causes a minor problem if you want to create a default project in the current Qt Creator(2.2.x) which generate a qml application viewer based on QDelarativeView. However it is simple enough to fix by modifying a few lines of auto-generated code. For example:

Your project > qmlapplicationviewer > Headers > qmlapplicationviewer.h


#include <QtQuick3D/qdeclarativeview.3d.h>

class QmlApplicationViewer: public QDeclarativeView3D


Your project > qmlapplicationviewer > Sources > qmlapplicationviewer.cpp


QmlApplicationViewer::QmlApplicationViewer(QWidget *parent)
: QDeclarativeView3D(parent)


Also, you will need to add qt3dquick in addition to qt3d to the CONFIG line in the  .pro file.

Qt Quick 3D library and examples for Symbian devices are found here. The certificate issue that we previously had is also solved.


Blog Topics: