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
qml-language.qdoc
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\page qtqml-language-topic.html
6\title The QML Language
7\brief Overview of the QML language fundamentals
8
9The QML language provides the foundation for building dynamic and declarative user interfaces.
10This section covers the core language features and syntax.
11
12\section1 Core Concepts
13
14\section2 QML Basics
15
16\l{QML Basics} introduces the fundamentals of QML, including object declarations,
17property assignments, and hierarchical object structures. Understanding these basics is essential
18for writing any QML code.
19
20\section2 QML Documents
21
22\l{QML Documents} explains how QML code is organized into files and the structure of a QML document.
23Each document can define reusable types and includes imports, object declarations, and property
24definitions.
25
26\section2 Property Binding
27
28\l{Property Binding} is one of QML's most powerful features, allowing properties to automatically
29update when their dependencies change. Bindings create dynamic relationships between properties
30without requiring imperative code.
31
32\section2 Signal and Handler Event System
33
34The \l{Signal and Handler Event System} provides QML's event handling mechanism. Objects can emit
35signals when certain events occur, and other objects can respond by implementing signal handlers,
36enabling loose coupling between components.
37
38\section1 Import System
39
40\section2 Import Statements
41
42\l{Import Statements} allow you to include \l{QML Modules}, JavaScript files and ECMAScript modules
43in your QML documents. They define what types and functionality are available within a document's
44scope.
45
46\l{Importing QML Document Directories} enables you to import all QML types from a directory without
47explicitly defining a module. This is useful for sharing QML components within a project during
48development.
49
50\l{Importing JavaScript Resources in QML} explains how to include JavaScript files from the
51JavaScript perspective. This includes importing into QML documents or into other JavaScript files.
52
53\section1 Advanced Language Features
54
55\section2 Property Shadowing and Override Semantics
56
57\l{Property Shadowing and Override Semantics} describes what happens when derived types redefine
58properties from their base types. Understanding these semantics is crucial for proper inheritance
59and component customization.
60
61\section2 Scope and Naming Resolution
62
63\l{Scope and Naming Resolution} explains how QML resolves identifiers and properties in nested
64object hierarchies. This includes understanding ID scopes, context properties, and the JavaScript
65scope chain.
66
67\section2 Resource Loading and Network Transparency
68
69\l{Resource Loading and Network Transparency} shows how QML can load resources from local files
70or network URLs using the same syntax. This allows seamless integration of remote content and
71simplifies asset management.
72
73\sa {The QML Reference}, {The QML Type System}
74*/