diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-08-20 01:10:44 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-08-20 01:13:27 (GMT) |
commit | 1f515224d52c9a33b46bbf926e82d5c2df1a84e4 (patch) | |
tree | 125e774130e2ae87eff1654d76337c17d5166b6d /doc | |
parent | f0c1beda18d79097ab85f062e9125da175ad04b8 (diff) | |
download | Qt-1f515224d52c9a33b46bbf926e82d5c2df1a84e4.zip Qt-1f515224d52c9a33b46bbf926e82d5c2df1a84e4.tar.gz Qt-1f515224d52c9a33b46bbf926e82d5c2df1a84e4.tar.bz2 |
Doing "import foo.qml" doesn't work in QML anymore
Task-number: QTBUG-13042
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/getting-started/gettingstartedqml.qdoc | 10 |
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 |