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
glossary.qdoc
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\page qml-glossary.html
6\title Glossary Of QML Terms
7\brief Glossary of terms used in the documentation for QML and Qt Quick
8
9\section1 Common Terms
10
11\table
12 \header
13 \li Term
14 \li Definition
15
16 \row
17 \li QML
18 \li The language in which QML applications are written. The language
19 architecture and engine are implemented by the Qt Qml module.
20
21 \row
22 \li Qt Quick
23 \li The standard library of types and functionality for the
24 QML language, which is provided by the Qt Quick module,
25 and may be accessed with "import QtQuick".
26
27 \row
28 \li Type
29 \li In QML, a \e type may refer to either a
30 \l{qtqml-typesystem-topic.html}{Value Type} or a
31 \l{qtqml-typesystem-topic.html#qml-object-types}{QML Object Type}.
32
33 The QML language provides a number of built-in
34 \l{qtqml-typesystem-valuetypes.html}{value types}, and the
35 Qt Quick module provides various \l {Qt Quick QML Types}{Qt Quick types}
36 for building QML applications. Types can also be provided by
37 third-party developers through (\l{qtqml-modules-topic.html}{modules}) or by the application
38 developer in the application itself through \l{qtqml-documents-definetypes.html}{QML Documents}.
39
40 See \l{qtqml-typesystem-topic.html}{The QML Type System}
41 for more details.
42
43 \row
44 \li Value Type
45 \li A \l{qtqml-typesystem-topic.html}{value type} is a simple type
46 such as \c int, \c string and \c bool. Unlike
47 \l{qtqml-typesystem-topic.html#qml-object-types}{object types},
48 an object cannot be instantiated from a value type; for example,
49 it is not possible to create an \c int object with properties,
50 methods, signals and so on.
51
52 Value types as well as object types usually belong to a
53 \l{qtqml-modules-topic.html}{QML module}. You have to import the
54 module to use them. Some types are built into the language, for
55 example int, bool, double, string, but also QtObject and Component.
56
57 See \l{qtqml-typesystem-topic.html}{The QML Type System}
58 for more details.
59
60 \row
61 \li Object Type
62 \li A \l{qtqml-typesystem-topic.html#qml-object-types}{QML Object Type}
63 is a type that can be instantiated by the QML engine.
64
65 A QML type can be defined either by a document in a .qml file
66 beginning with a capital letter, or by a QObject-based C++ class.
67
68 See \l{qtqml-typesystem-topic.html}{The QML Type System}
69 for more details.
70
71 \row
72 \li Object
73 \li A QML object is an instance of a
74 \l{qtqml-typesystem-topic.html#qml-object-types}{QML Object Type}.
75
76 Such objects are created by the engine when it processes
77 \l{qtqml-syntax-basics.html#object-declarations}{object declarations},
78 which specify the objects to be created and the attributes that are to
79 be defined for each object.
80
81 Additionally, objects can be dynamically created at runtime through
82 Component.createObject() and Qt.createQmlObject().
83
84 See also \l{#lazy-instantiation}{Lazy Instantiation}.
85
86 \row
87 \li Component
88 \li A component is a template from which a QML object or object
89 tree is created. It is produced when a document is loaded by
90 the QML engine. Once it has been loaded, it can be used to
91 instantiate the object or object tree that it represents.
92
93 Additionally, the \l Component type is a special type that can
94 can be used to declare a component inline within a document.
95 Component objects can also be dynamically created through
96 Qt.createComponent() to dynamically create QML objects.
97
98 \row
99 \li Document
100 \li A \l{qtqml-documents-topic.html}{QML Document} is a self
101 contained piece of QML source code that begins with one or more
102 import statements and contains a single top-level object
103 declaration. A document may reside in a .qml file or a text string.
104
105 If it is placed in a .qml file whose name begins with a capital
106 letter, the file is recognized by the engine as a definition of
107 a QML type. The top-level object declaration encapsulates the
108 object tree that will be instantiated by the type.
109
110 \row
111 \li Property
112 \li A property is an attribute of an object type that has a name and
113 an associated value; this value can be read (and in most cases, also
114 written to) externally.
115
116 An object can have one or more properties. Some properties
117 are associated with the canvas (e.g., x, y, width, height,
118 and opacity) while others may be data specific to that type
119 (e.g., the "text" property of the \l Text type).
120
121 See \l{qtqml-syntax-objectattributes.html}{QML Object Attributes}
122 for more details.
123
124 \row
125 \li Binding
126 \li A binding is a JavaScript expression which is "bound" to a
127 property. The value of the property at any point in time
128 will be the value returned by evaluating that expression.
129
130 See \l{qtqml-syntax-propertybinding.html}{Property Binding}
131 for more details.
132
133 \row
134 \li Signal
135 \li A signal is a notification from a QML object. When an object emits
136 a signal, other objects can receive and process this signal through
137 a \l{Signal Attributes}{signal handler}.
138
139 Most properties of QML objects
140 have a change signal, and also an associated change signal handler
141 which may be defined by clients to implement functionality. For
142 example, the "onClicked()" handler of an instance of the MouseArea
143 type might be defined in an application to cause a sound to be
144 played.
145
146 See \l{qtqml-syntax-signals.html}{Signal and Handler Event System}
147 for more details.
148
149 \row
150 \li Signal Handler
151 \li A signal handler is the expression (or function) which is triggered
152 by a signal. It is also known as a "slot" in C++.
153
154 See \l{qtqml-syntax-signals.html}{Signal and Handler Event System}
155 for more details.
156
157 \row
158 \li Lazy Instantiation \target lazy-instantiation
159 \li Object instances can be instantiated "lazily" at run-time,
160 to avoid performing unnecessary work until needed. Qt Quick
161 provides the \l Loader type to make lazy instantiation more
162 convenient.
163\endtable
164*/