aboutsummaryrefslogtreecommitdiffstats
path: root/doc/qtcreator
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-04-08 11:08:05 +0200
committerEike Ziller <eike.ziller@qt.io>2024-04-08 11:08:05 +0200
commit2626af4cd48cf86421cc10e2e901455c1fac4e16 (patch)
treee5801cb0da2d16cb183def94734a851d2244e6fb /doc/qtcreator
parent4e50e1d6577a831e005945c89633a76e3f55de31 (diff)
parentc25c54d454f06a7998707d8604b5fecf034874f5 (diff)
Merge remote-tracking branch 'origin/13.0'
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs src/libs/utils/fsengine/fileiteratordevicesappender.h Change-Id: Ia61fa12d14a4f862549509bd980cf9f66905c17f
Diffstat (limited to 'doc/qtcreator')
-rw-r--r--doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc46
1 files changed, 28 insertions, 18 deletions
diff --git a/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc b/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc
index bf8b4581c6..46651d8748 100644
--- a/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc
+++ b/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc
@@ -36,22 +36,25 @@
\list 1
\li Create custom components and place all the \c .qml files in a
- directory dedicated to your module. For example:
+ directory dedicated to your module. For example,
\c {imports\asset_imports}.
- \li For Qt Quick UI Prototype projects (.qmlproject), specify the path to
+ \if defined(qtcreator)
+ \li For Qt Quick UI Prototype projects (.qmlproject), specify the path to
the directory that has the module in the .qmlproject file
of the application where you want to use the module
- as a value of the \c importPaths variable. For example
+ as a value of the \c importPaths variable. For example,
\c{importPaths: [ "imports", "asset_imports" ]}.
-
+ \else
+ \li Specify the path to the directory that has the module in the
+ .qmlproject file of the application where you want to use the module
+ as a value of the \c importPaths variable. For example,
+ \c{importPaths: [ "imports", "asset_imports" ]}.
+ \endif
\li Create a \c qmldir file for your module and place it
in the module directory. For more information, see
\l {Module Definition qmldir Files}.
- \li Create a \c qmltypes file, as instructed in
- \l {Generating Type Description Files}.
-
\li Create a directory named \c designer in your module directory.
\li Create a \c .metainfo file for your module and place it in the
@@ -66,23 +69,29 @@
\if defined(qtcreator)
\li Import the module into the project, as instructed in
\l {Importing QML Modules}.
- \endlist
-
- \note If \QC cannot find the new QML module, build the project
- and then go to \uicontrol {Tools} > \uicontrol {QML/JS} >
- \uicontrol {Reset Code Model} to reset the code model.
-
\else
\li Build your module using the same Qt version and compiler as \QDS.
- For more information, see \l {Running QML Modules in Design Mode}.
+
+ Your module and components should now appear in \uicontrol Components.
+ \endif
+
\endlist
- Your module should now appear in \uicontrol Components. Your components
- should appear in a subsection of \uicontrol Components if a valid
- \c .metainfo file is in place.
+ \note If \QC cannot find the new QML module, build the project
+ and then go to \uicontrol {Tools} > \uicontrol {QML/JS} >
+ \uicontrol {Reset Code Model} to reset the code model.
+ \if defined(qtdesignstudio)
+ For more information about how to show the \uicontrol {Tools} menu, see
+ \l{Customizing the Menu}.
\endif
- \section1 Generating Type Description Files
+ \if defined(qtcreator)
+ \section1 Developing with Qt 6.1 or Earlier
+
+ Since Qt 6.2, CMake generates the \c qmltypes and \c qmldir files
+ automatically.
+
+ \section2 Generating Type Description Files
When \l{Defining QML Types from C++}{registering QML types}, make sure that
the QML module has a \c{plugins.qmltypes} file. Ideally, it should be located
@@ -115,6 +124,7 @@
\endcode
The import path affects all the targets built by the CMake project.
+ \endif
\if defined(qtdesignstudio)
\section1 Running QML Modules in Design Mode