Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
legacymodules.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtqml-modules-legacymodules.html
6
\title Legacy Modules
7
\brief Description of legacy QML modules
8
9
Legacy modules are modules whose specification \c qmldir file does not contain
10
a module identifier directive. A legacy module may be either installed into
11
the QML import path (as an installed legacy module) or imported by clients with
12
a relative import (as a located legacy module). Clients are advised to avoid
13
using legacy modules if possible. Module developers should ensure they create
14
identified modules and not legacy modules.
15
16
\section1 Installed Legacy Modules
17
18
An installed, non-identified module is automatically given an identifier by the
19
QML engine. This implicitly defined identifier is equal to the install path of
20
the module (relative to the QML import path) where directory-separator
21
characters are replaced with period characters.
22
23
A non-identified module which is installed into the QML import path has the
24
following semantics:
25
\list
26
\li it may be imported by clients via the implicit module identifier
27
\li clients must specify a version when importing the module
28
\li conflicting type names are resolved arbitrarily by the QML engine, and the
29
way in which conflicts are resolved is not guaranteed to stay the same
30
between different versions of QML
31
\li other legacy modules may modify or override type definitions provided by
32
the installed legacy module
33
\endlist
34
35
\section1 Located Legacy Modules
36
37
A non-identified module which is imported via a relative directory path
38
import statement is loaded by the engine as a located legacy module. The
39
following semantics apply to located legacy modules:
40
\list
41
\li it may be imported by clients via a relative import path
42
\li it is not mandatory for clients to specify a version when importing the
43
module
44
\li if no import version is supplied by the client in the import statement,
45
no guarantees are given by the QML engine about which version of the
46
definition of a given type name will be imported
47
\li conflicting type names are resolved arbitrarily by the QML engine, and the
48
way in which conflicts are resolved is not guaranteed to stay the same
49
between different versions of QML
50
\li other legacy modules may modify or override type definitions provided by
51
the located legacy module
52
\endlist
53
54
A located legacy module may reside on the local file system or on the
55
network and can be referred to by a URL that specifies the file system path or
56
network URL.
57
58
\sa {Modern QML modules}, {Port QML modules to CMake}
59
60
*/
qtdeclarative
src
qml
doc
src
qmllanguageref
modules
legacymodules.qdoc
Generated on
for Qt by
1.14.0