summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/extending.qdoc15
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc1
2 files changed, 14 insertions, 2 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index db35961..b872632 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -300,11 +300,22 @@ attachment object are those that become available for use as the attached
property block.
Any QML type can become an attaching type by declaring the
-\c qmlAttachedProperties() public function:
+\c qmlAttachedProperties() public function and declaring that the class has
+QML_HAS_ATTACHED_PROPERTIES:
\quotation
\code
-static AttachedPropertiesType *qmlAttachedProperties(QObject *object)
+class MyType : public QObject {
+ Q_OBJECT
+public:
+
+ ...
+
+ static AttachedPropertiesType *qmlAttachedProperties(QObject *object);
+};
+
+QML_DECLARE_TYPEINFO(MyType, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(MyType)
\endcode
Return an attachment object, of type \a AttachedPropertiesType, for the
attachee \a object instance. It is customary, though not strictly required, for
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index ab952e7..5d8623b 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -84,6 +84,7 @@ completely new applications. QML is fully \l {Extending QML}{extensible from C+
\o \l {QML Documents}
\o \l {Property Binding}
\o \l {ECMAScript Blocks}
+\o \l {QML Scope}
\o \l {Network Transparency}
\o \l {qmlmodels}{Data Models}
\o \l {anchor-layout}{Anchor-based Layout}