diff options
author | David Boddie <dboddie@trolltech.com> | 2010-08-23 13:03:31 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-08-23 13:03:31 (GMT) |
commit | 74833a2377a7570a910d970c272b846043ae3206 (patch) | |
tree | a7524f619e64e57f5d7fe534258bb96012aafb18 /doc/src/declarative | |
parent | ee7e17bb48c7f6ca0c74f1df3e146e99f56f2060 (diff) | |
download | Qt-74833a2377a7570a910d970c272b846043ae3206.zip Qt-74833a2377a7570a910d970c272b846043ae3206.tar.gz Qt-74833a2377a7570a910d970c272b846043ae3206.tar.bz2 |
Doc: Moved the inline code into snippet files.
Diffstat (limited to 'doc/src/declarative')
-rw-r--r-- | doc/src/declarative/qdeclarativedocument.qdoc | 67 |
1 files changed, 10 insertions, 57 deletions
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc index 068297a..4aed63f 100644 --- a/doc/src/declarative/qdeclarativedocument.qdoc +++ b/doc/src/declarative/qdeclarativedocument.qdoc @@ -28,34 +28,17 @@ /*! \page qdeclarativedocuments.html \title QML Documents +\brief A description of QML documents and the kind of content they contain. -A QML document is a block of QML source code. QML documents generally correspond to files -stored on a disk or network resource, but can also be constructed directly from text data. +\section1 Introduction -Here is a simple QML document: +A QML document is a block of QML source code. QML documents generally correspond to files +stored on a disk or at a location on a network, but they can also be constructed directly +from text data. -\code -import Qt 4.7 +Here is a simple QML document: -Rectangle { - width: 240; height: 320; - - resources: [ - Component { - id: contactDelegate - Text { - text: modelData.firstName + " " + modelData.lastName - } - } - ] - - ListView { - anchors.fill: parent - model: contactModel - delegate: contactDelegate - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-documents/non-trivial.qml document QML documents are always encoded in UTF-8 format. @@ -96,7 +79,7 @@ Each instance is created with a different value for its \c text property: \o application.qml \row -\o \snippet doc/src/snippets/declarative/qmldocuments.qml 0 +\o \snippet doc/src/snippets/declarative/qmldocuments.qml document \o \qml import Qt 4.7 @@ -153,39 +136,9 @@ These final two examples are behaviorally identical to the original document. \table \row \o -\code -import Qt 4.7 - -Rectangle { - width: 240; height: 320; - - ListView { - anchors.fill: parent - model: contactModel - delegate: Component { - Text { - text: modelData.firstName + " " + modelData.lastName - } - } - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-documents/inline-component.qml document \o -\code -import Qt 4.7 - -Rectangle { - width: 240; height: 320; - - ListView { - anchors.fill: parent - model: contactModel - delegate: Text { - text: modelData.firstName + " " + modelData.lastName - } - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-documents/inline-text-component.qml document \endtable \sa QDeclarativeComponent |