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