Overwhelmed by the range of options to use for my Qt project
-
Hi, I hope this is the right place for this question.
I want to create a desktop application whose main component is to be a 3D scene. This 3D scene features a model that is composed of basic geometrical shapes, the number and specifics of which are specified by the user via the GUI, i.e. size, translation, rotation about a certain vector, etc. I hope this is specific enough.
Now I have the impression that I could try to implement it fully in C++ using Qt Widgets, in QML using Qt Quick, or even combine those in different ways. I'm extremely new to Qt so I'm unsure which approach would suit my needs the best.
[EDIT: Spam links removed --JKSH]
-
Hi
I would go for QML for the 3D part as more info,
more examples and as far as i know not all interfaces are available in c++ yet.
Also the QML is maybe also easier/cleaner than the c++ api.
like a camera.Camera { id: camera projectionType: CameraLens.PerspectiveProjection fieldOfView: 45 aspectRatio: 16/9 nearPlane : 0.1 farPlane : 1000.0 position: Qt.vector3d( 0.0, 0.0, -40.0 ) upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) }
The same in c++ will not be as easy to read :)
maybe start here to get a feel of QML ?
https://doc.qt.io/qt-5/qt3d-simple-qml-example.htmlIf you already know c++ and are good/ok with it, i would start with
https://doc.qt.io/qt-5/qt3d-widgets-scene3d-example.htmlwhere we have the QML in a widget.
That allows you to fast have some widgets to set the data with and can
focus on the 3d part and its interface.You can then later decide if you want a clean QML app or a mix.
Just make sure you do proper OOP and have interfaces for add/edit 3d object and
not tie it to the interface/widget.The mixed way might have lower performance but it might not matter for you.