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
\meta {keywords} {qmltopic}
7
\title Legacy Modules
8
\brief Description of legacy QML modules
9
10
Legacy modules are modules whose specification \c qmldir file does not contain
11
a module identifier directive. A legacy module may be either installed into
12
the QML import path (as an installed legacy module) or imported by clients with
13
a relative import (as a located legacy module). Clients are advised to avoid
14
using legacy modules if possible. Module developers should ensure they create
15
identified modules and not legacy modules.
16
17
\section1 Installed Legacy Modules
18
19
An installed, non-identified module is automatically given an identifier by the
20
QML engine. This implicitly defined identifier is equal to the install path of
21
the module (relative to the QML import path) where directory-separator
22
characters are replaced with period characters.
23
24
A non-identified module which is installed into the QML import path has the
25
following semantics:
26
\list
27
\li it may be imported by clients via the implicit module identifier
28
\li clients must specify a version when importing the module
29
\li conflicting type names are resolved arbitrarily by the QML engine, and the
30
way in which conflicts are resolved is not guaranteed to stay the same
31
between different versions of QML
32
\li other legacy modules may modify or override type definitions provided by
33
the installed legacy module
34
\endlist
35
36
\section1 Located Legacy Modules
37
38
A non-identified module which is imported via a relative directory path
39
import statement is loaded by the engine as a located legacy module. The
40
following semantics apply to located legacy modules:
41
\list
42
\li it may be imported by clients via a relative import path
43
\li it is not mandatory for clients to specify a version when importing the
44
module
45
\li if no import version is supplied by the client in the import statement,
46
no guarantees are given by the QML engine about which version of the
47
definition of a given type name will be imported
48
\li conflicting type names are resolved arbitrarily by the QML engine, and the
49
way in which conflicts are resolved is not guaranteed to stay the same
50
between different versions of QML
51
\li other legacy modules may modify or override type definitions provided by
52
the located legacy module
53
\endlist
54
55
A located legacy module may reside on the local file system or on the
56
network and can be referred to by a URL that specifies the file system path or
57
network URL.
58
59
\sa {Modernizing QML Modules}, {Port QML modules to CMake}
60
61
*/
qtdeclarative
src
qml
doc
src
qmllanguageref
modules
legacymodules.qdoc
Generated on
for Qt by
1.16.1