- Qt 6.11
- Qt Qml
- The QML Reference
- The QML Language
- Qt 6.11.1 Reference Documentation

The QML Reference ◦ QML Basics

# The QML Language

The QML language provides the foundation for building dynamic and declarative user interfaces. This section covers the core language features and syntax.

## Core Concepts

### QML Basics

QML Basics introduces the fundamentals of QML, including object declarations, property assignments, and hierarchical object structures. Understanding these basics is essential for writing any QML code.

### QML Documents

QML Documents explains how QML code is organized into files and the structure of a QML document. Each document can define reusable types and includes imports, object declarations, and property definitions.

### Property Binding

Property Binding is one of QML's most powerful features, allowing properties to automatically update when their dependencies change. Bindings create dynamic relationships between properties without requiring imperative code.

### Signal and Handler Event System

The Signal and Handler Event System provides QML's event handling mechanism. Objects can emit signals when certain events occur, and other objects can respond by implementing signal handlers, enabling loose coupling between components.

## Import System

### Import Statements

Import Statements allow you to include QML Modules, JavaScript files and ECMAScript modules in your QML documents. They define what types and functionality are available within a document's scope.

Importing QML Document Directories enables you to import all QML types from a directory without explicitly defining a module. This is useful for sharing QML components within a project during development.

Importing JavaScript Resources in QML explains how to include JavaScript files from the JavaScript perspective. This includes importing into QML documents or into other JavaScript files.

## Advanced Language Features

### Property Shadowing and Override Semantics

Property Shadowing and Override Semantics describes what happens when derived types redefine properties from their base types. Understanding these semantics is crucial for proper inheritance and component customization.

### Scope and Naming Resolution

Scope and Naming Resolution explains how QML resolves identifiers and properties in nested object hierarchies. This includes understanding ID scopes, context properties, and the JavaScript scope chain.

### Resource Loading and Network Transparency

Resource Loading and Network Transparency shows how QML can load resources from local files or network URLs using the same syntax. This allows seamless integration of remote content and simplifies asset management.

See also The QML Reference and The QML Type System.

The QML Reference ◦ QML Basics