On 22/04/2021 15:57, Jérôme Godbout wrote:
I wonder if it would be possible to totally declare the QtQuick scene from C++ without any Qml files actually, with Qt6 you got C++ binding and the Qml is compiled to C++ anyway. Maybe I miss something but it could be possible to actually only write C++ to create the actual scene?!


"Could" it be possible? Certainly yes, but Qt Quick never wanted to provide a public C++ API, only a public QML one. (Why? No idea, wasn't there in the room when it was decided; likely, having the freedom of rearrange the C++ implementation, which clashes against the strong API/ABI promise of Qt. Only the QML API is stable.)

AFAICR, QSkinny is an example of creating Qt Quick scenes from C++.

Of course, scene creation is just one of the aspects, you'd also then really want to reimplement C++ the other goodies you get in QML (e.g. bindings, Behavior, etc.), some of which are now coming in Qt 6.x.

HTH,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to