summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/modules.qdoc
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-10 08:58:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-10 08:58:00 (GMT)
commit9a05223ea9a6ee0dbaac256607be201ea08e6fb6 (patch)
tree54e5407758a18954bdaf64146b8d3ad8532b9297 /doc/src/declarative/modules.qdoc
parentac27c8ad39a9646a9e509ba7a58f75eeae10bb6e (diff)
parentbfc6a32c2a203766a6debdf19a265a4f0e198403 (diff)
downloadQt-9a05223ea9a6ee0dbaac256607be201ea08e6fb6.zip
Qt-9a05223ea9a6ee0dbaac256607be201ea08e6fb6.tar.gz
Qt-9a05223ea9a6ee0dbaac256607be201ea08e6fb6.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (119 commits) Add Mac OS X bundle description for qml runtime Cleanup Disallow writes to read-only value type properties Allow undefined to be assigned to QVariant properties Add a Qt.isQtObject() method Fix crash in QML library imports Remove QT_VERSION checks in QML List properties aren't read-only Small doc fix. Make sure WorkerScript thread is stopped on deletion. This also fixes Release ListModel's worker agent on deletion. Doc fixes Fix example Example code style improvements Enable other wrapping modes. TextEdit::wrap changed to TextEdit::wrapMode enumeration Remove use of obsolete "Script" element. unwarn Replace "var" with "variant" in tests Fix test after deletion of GraphicsObjectContainer. ...
Diffstat (limited to 'doc/src/declarative/modules.qdoc')
-rw-r--r--doc/src/declarative/modules.qdoc39
1 files changed, 22 insertions, 17 deletions
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index d476d6f..0c69930 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -86,7 +86,7 @@ The second exception is explained in more detail in the section below on Namespa
\section2 The Import Path
Installed modules are searched for on the import path.
-The \c -L option to the \l {Qt Declarative UI Runtime}{qml} runtime adds paths to the import path.
+The \c -I option to the \l {Qt Declarative UI Runtime}{qml} runtime adds paths to the import path.
From C++, the path is available via \l QDeclarativeEngine::importPathList() and can be prepended to
using \l QDeclarativeEngine::addImportPath().
@@ -114,19 +114,7 @@ Installed files do not need to import the module of which they are a part, as th
to the other QML files in the module as relative (local) files, but
if the module is imported from a remote location, those files must nevertheless be listed in
the \c qmldir file. Types which you do not wish to export to users of your module
-may be marked with the \c internal keyword:
-
-\code
-internal <TypeName> <File>
-\endcode
-
-\c plugin <Name> [<Path>] lines are used to add \l{QDeclarativeExtensionPlugin}{QML C++ plugins}
-to the module. <Name> is the
-name of the library. <Path> is an optional argument specifying the full path to the directory
-containing the plugin file; if it is omitted then the directory is assumed to be the same as
-the directory of the \c qmldir file. Note that <Name> is not usually the same as the file name
-of the plugin binary, which is platform dependent; e.g. the library MyAppTypes would produce
-a libMyAppTypes.so on Linux and MyAppTypes.dll on Windows.
+may be marked with the \c internal keyword: \c internal <TypeName> <File>.
The same type can be provided by different files in different versions, in which
case later earlier versions (eg. 1.2) must precede earlier versions (eg. 1.0),
@@ -141,6 +129,23 @@ of installed software, since a versioned import \e only imports types for that v
leaving other identifiers available, even if the actual installed version might otherwise
provide those identifiers.
+\c plugin <Name> [<Path>] lines are used to add \l{QDeclarativeExtensionPlugin}{QML C++ plugins}
+to the module.
+
+<Name> is the name of the library. It is usually not the same as the file name
+of the plugin binary, which is platform dependent; e.g. the library MyAppTypes would produce
+a libMyAppTypes.so on Linux and MyAppTypes.dll on Windows.
+By default the engine searches for the plugin library in the directory containing the \c qmldir
+file. The \c -P option to the \l {Qt Declarative UI Runtime}{qml} runtime adds paths to the
+plugin search path.
+From C++, the path is available via \l QDeclarativeEngine::pluginPathList() and can be prepended to
+using \l QDeclarativeEngine::addPluginPath().
+
+<Path> is an optional argument specifying either an absolute path to the directory containing the
+plugin file, or a relative path from the directory containing the \c qmldir file to the directory
+containing the plugin file.
+
+
\section2 Namespaces - Named Imports
When importing content it by default imports types into the global namespace.
@@ -150,10 +155,10 @@ types to be referenced, or purely for readability.
To import a module into a namespace:
\code
-import Qt 4.6 as TheQtLibrary
+import Qt 4.7 as TheQtLibrary
\endcode
-Types from Qt 4.6 may then be used, but only by qualifying them with the namespace:
+Types from the Qt 4.7 module may then be used, but only by qualifying them with the namespace:
\code
TheQtLibrary.Rectangle { ... }
@@ -163,7 +168,7 @@ Multiple modules can be imported into the same namespace in the same way that mu
modules can be imported into the global namespace:
\code
-import Qt 4.6 as Nokia
+import Qt 4.7 as Nokia
import Ovi 1.0 as Nokia
\endcode