diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-04-07 11:50:39 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-04-28 11:46:03 +0200 |
commit | c2de5643cd4f1b8d8b10e2bb62fdf95f12fdd9e3 (patch) | |
tree | 55cfa6610c91315d5ae6cbbf2c961fb2fbfcabd8 /src/qml/qml/qqml.h | |
parent | 1029b2b9f3d0ff88c0900fbfec2fac873aa6bcd4 (diff) |
Register value types declaratively
For now this has the effect of adding them to the .qmltypes files. In
the future, the registration shall actually add additional value types
you can declare as properties in QML.
Change-Id: Ifee5a8ec054f35cc7bd07eb992a136730be68da7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.h')
-rw-r--r-- | src/qml/qml/qqml.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index 252e4a5baf..4957c12036 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -77,6 +77,10 @@ #define QML_NAMED_ELEMENT(NAME) \ Q_CLASSINFO("QML.Element", #NAME) +#define QML_VALUE_TYPE(NAME) \ + Q_CLASSINFO("QML.Element", #NAME) \ + QML_UNCREATABLE("Value types cannot be created.") + #define QML_UNCREATABLE(REASON) \ Q_CLASSINFO("QML.Creatable", "false") \ Q_CLASSINFO("QML.UncreatableReason", REASON) |