diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-11-30 03:48:30 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-11-30 03:50:17 (GMT) |
commit | efc41eaa7224c33b5b5af7eae27c93c6748255bc (patch) | |
tree | e7b7bf80dba21672864defbc8d8f73014330a3d4 | |
parent | 282441f72a7704aadc5525a360430d0c3d49aea6 (diff) | |
download | Qt-efc41eaa7224c33b5b5af7eae27c93c6748255bc.zip Qt-efc41eaa7224c33b5b5af7eae27c93c6748255bc.tar.gz Qt-efc41eaa7224c33b5b5af7eae27c93c6748255bc.tar.bz2 |
Document which header to include for qmlRegister functions.
Task-number: QTBUG-15630
Reviewed-by: Bea Lam
-rw-r--r-- | doc/src/declarative/extending.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/qtdeclarative.qdoc | 16 | ||||
-rw-r--r-- | doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 5c1b977..740f7d1 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -75,6 +75,8 @@ constructor. \endquotation +#include <QtDeclarative> to use qmlRegisterType(). + Types can be registered by libraries, application code, or by plugins (see QDeclarativeExtensionPlugin). diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index f2b2032..b0c6e06 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -57,6 +57,8 @@ \relates QDeclarativeEngine Equivalent to \c Q_DECLARE_METATYPE(TYPE) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>) + + #include <QtDeclarative> to use this macro. */ /*! @@ -68,6 +70,8 @@ Current the only supported type info is \c QML_HAS_ATTACHED_PROPERTIES which declares that the \a Type supports \l {Attached Properties}. + + #include <QtDeclarative> to use this macro. */ @@ -86,6 +90,10 @@ "com.mycompany.qmlcomponents": \code + #include <QtDeclarative> + + ... + qmlRegisterType<MySliderItem>("com.mycompany.qmlcomponents", 1, 0, "Slider"); \endcode @@ -119,6 +127,8 @@ Returns the QML type id. + #include <QtDeclarative> to use this function. + \sa qmlRegisterTypeNotAvailable() */ @@ -154,6 +164,8 @@ Without this, a generic "Game is not a type" message would be given. + #include <QtDeclarative> to use this function. + \sa qmlRegisterUncreatableType() */ @@ -166,6 +178,8 @@ system. Instances of this type cannot be created from the QML system. + #include <QtDeclarative> to use this function. + Returns the QML type id. */ @@ -176,5 +190,7 @@ This template function registers the C++ type in the QML system under the name \a typeName. + #include <QtDeclarative> to use this function. + Returns the QML type id. */ diff --git a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h b/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h index fd9db5e..cec9757 100644 --- a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h +++ b/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h @@ -37,10 +37,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +//![0] #include <QtCore> #include <QtDeclarative> -//![0] class ImageViewer : public QDeclarativeItem { Q_OBJECT |