Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
Description
Currently, the dialog only provides "Add QML_ELEMENT", which creates an instantiable QML type that's named after the C++ class.
However, there are many other possibilities:
- https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html#choosing-the-correct-integration-method-between-c-and-qml
- https://doc.qt.io/qt-6/qtqml-cppintegration-definetypes.html#registering-c-types-with-the-qml-type-system
It would be helpful for the dialog to provide more common options, as well as to prevent users from selecting invalid combinations, e.g.
- A class with QML_ELEMENT must also have Q_OBJECT
- A class with QML_VALUE_TYPE must also have Q_GADGET
- QML_ELEMENT and QML_ANONYMOUS are mutually exclusive