I'm following* this example: http://doc.qt.io/qt-5/qt3drenderer-multiviewport-example.html
*Adding it line-by-line to fresh project, looking up what each thing is as I go.
However, the CameraLens QML component isn't being found. I'm using QT Creator 3.6.0.
Here's the .pro:
TEMPLATE = app
QT += 3dcore 3drenderer 3dquick qml quick
CONFIG += c++11
SOURCES += main.cpp
RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Default rules for deployment.
include(deployment.pri)
Here's my QML:
import QtQuick 2.0
import Qt3D 2.0
import Qt3D.Renderer 2.0
Entity {
id: rootNode
CameraLens {
id: cameraLens
projectionType: CameraLens.PerspectiveProjection
fieldOfView: 45
aspectRatio: 16/9
nearPlane: 0.01
farPlane: 1000.0
}
}
As far as I'm able to tell, I'm on QT 5.5 (it's the only one I've got installed), which this documentation says should include the CameraLens: http://doc.qt.io/qt-5/qml-qt3d-cameralens.html
I don't know what to look at next or what might be going wrong.