summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-08-20 01:10:44 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-09-02 05:50:35 (GMT)
commit3015f695f4d2a2a776cf4bc85121ebc051706351 (patch)
tree04508611d82f1e9cfd3d446037c3af3aa681d33d /doc
parent1d146ca663933041c7b4810912ba5f7dc05e3e8f (diff)
downloadQt-3015f695f4d2a2a776cf4bc85121ebc051706351.zip
Qt-3015f695f4d2a2a776cf4bc85121ebc051706351.tar.gz
Qt-3015f695f4d2a2a776cf4bc85121ebc051706351.tar.bz2
Doing "import foo.qml" doesn't work in QML anymore
Task-number: QTBUG-13042 (cherry picked from commit 1f515224d52c9a33b46bbf926e82d5c2df1a84e4)
Diffstat (limited to 'doc')
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc10
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index 885e6ce..a19d281 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -224,15 +224,13 @@
\code
import Qt 4.7 \\import the main Qt QML module
import "folderName" \\import the contents of the folder
- import "Button.qml" \\import a QML file
- import "NewButton.qml" as ButtonModule \\import a QML file and give it a name
import "script.js" as Script \\import a Javascript file and name it as Script
\endcode
- To use the \c Button element in \c FileMenu.qml, we need to import \c Button.qml.
- The syntax shown above, shows how to use the \c import keyword. However, the
- \c {import Button.qml} is not necessary; qmlviewer will import all the contents
- of the current directory. We can directly create a \c Button element by declaring
+ The syntax shown above shows how to use the \c import keyword. This is required to
+ use JavaScript files, or QML files that are not within the same directory. Since
+ \c Button.qml is in the same directory as \c FileMenu.qml, we do not need to import
+ the \c Button.qml file to use it. We can directly create a \c Button element by declaring
\c Button{}, similar to a \c Rectangle{} declaration.
\code