The Qt 6 Book
Contribute!
Contribute!
  • Preface

    • Welcome!
    • Acknowledgements
    • Authors
  • Meet Qt

    • Qt and Qt Quick
    • Qt Building Blocks
    • Qt 6 Introduction
  • Getting Started

    • Quick Start
    • Installing Qt 6 SDK
    • Hello World
    • Application Types
    • Summary
  • Qt Creator IDE

    • Qt Creator IDE
    • The User Interface
    • Registering your Qt Kit
    • Managing Projects
    • Using the Editor
    • Locator
    • Debugging
    • Shortcuts
  • Quick Starter

    • Quick Starter
    • QML Syntax
    • Core Elements
    • Components
    • Simple Transformations
    • Positioning Elements
    • Layout Items
    • Input Elements
    • Advanced Techniques
  • Fluid Elements

    • Fluid Elements
    • Animations
    • States and Transitions
    • Advanced Techniques
  • QtQuick Controls

    • UI Controls
    • Introduction to Controls
    • An Image Viewer
    • Common Patterns
    • The Imagine Style
    • Summary
  • Model View

    • Model-View-Delegate
    • Concept
    • Basic Models
    • Dynamic Views
    • Delegate
    • Advanced Techniques
    • Summary
  • Canvas

    • Canvas Element
    • Convenience API
    • Gradients
    • Shadows
    • Images
    • Transformation
    • Composition Modes
    • Pixel Buffers
    • Canvas Paint
    • Porting from HTML5 Canvas
  • Shapes

    • Shapes
    • A Basic Shape
    • Building Paths
    • Filling Shapes
    • Animating Shapes
    • Summary
  • Effects

    • Effects in QML
    • Particle Concept
    • Simple Simulation
    • Particle Parameters
    • Directed Particles
    • Affecting Particles
    • Particle Groups
    • Particle Painters
    • Graphics Shaders
    • Shader Elements
    • Fragment Shaders
    • Wave Effect
    • Vertex Shader
    • Curtain Effect
    • Summary
  • Multimedia

    • Multimedia
    • Playing Media
    • Sound Effects
    • Video Streams
    • Capturing Images
    • Summary
  • Qt Quick 3D

    • Qt Quick 3D
    • The Basics
    • Working with Assets
    • Materials and Light
    • Animations
    • Mixing 2D and 3D Contents
    • Summary
  • Networking

    • Networking
    • Serving UI via HTTP
    • Templates
    • HTTP Requests
    • Local files
    • REST API
    • Authentication using OAuth
    • Web Sockets
    • Summary
  • Storage

    • Storage
    • Settings
    • Local Storage - SQL
  • Dynamic QML

    • Dynamic QML
    • Loading Components Dynamically
    • Creating and Destroying Objects
    • Tracking Dynamic Objects
    • Summary
  • Javascript

    • JavaScript
    • Browser/HTML vs Qt Quick/QML
    • JS Language
    • JS Objects
    • Creating a JS Console
  • Qt C++

    • Qt and C++
    • A Boilerplate Application
    • The QObject
    • Build Systems
    • Common Qt Classes
    • Models in C++
  • Extending QML

    • Extending QML with C++
    • Understanding the QML Run-time
    • Plugin Content
    • Creating the plugin
    • FileIO Implementation
    • Using FileIO
    • Summary
  • Qt for Python

    • Qt for Python
    • Introduction
    • Installing
    • Building an Application
    • Limitations
    • Summary
  • Qt for MCUs

    • Qt for MCUs
    • Setup
    • Hello World - for MCUs
    • Integrating with C++
    • Working with Models
    • Summary

Welcome!

Welcome to The Qt 6 Book - A book about QML. This text will guide you through QML, Qt's language for creating dynamic user interfaces.

I believe that the ability to build declarative, reactive, hardware accelerated user interfaces executing at native performance across all major platforms (and some not so major) is a game changer. When starting with Qt, it was almost as if I had my secret weapon to building software quickly. QML takes that to the next level.

How is this book different from the Qt documentation? I hear you ask. The intention is to build a complement. This book is meant as a book that you can read from front to back where each chapter builds on what you've previously learned. But it can also be used as a way for the experienced reader to get oriented in a new topic. Each chapter focuses on a specific topic and introduces the concepts from Qt and QML. However, the Qt documentation will always provide the full picture and is a great reference to look up the details about all elements, properties, enumerations, and more.

I wish you a pleasant read!

Johan Thelin

Structure

The book can be said to be split into three parts. The split is not clear cut enough to motivate a strict division of chapters, but more of a guideline that we've tried to follow when writing it.

The first few chapters, let's say until somewhere around chapter 5 - 7 can be considered an introduction. If you want to learn QML, you should make sure to read these chapters.

The following chapters, 6-14, can be seen as fairly separate chapters introducing independent topics, even though the models from chapter 7 are used in many more places. Feel free to dive into these in the order that you like and learn about the topics that you are curious about.

The remainder of the book focuses on more advanced topics such as details of JavaScript, mixing C++ and QML, and the Qt for Python bindings and QML. These are important topics and I really want you to read them. To build a full application with QML you need to understand these topics, but their main focus is not on QML.

Never Ending Work in Progress

The Qt 6 Book is a never ending work in progress. We welcome contributors and are planning to open up our infrastructure to let you contribute both by reporting issues and by contributing fixes and new content. The end goal is to present you with a printed book when the material has reached a maturity level that we are happy with, but we want to share this with you already now and to learn from your feedback what to improve, and what additional content to add.

Help us improve this page!
Last Updated: 11/26/25, 7:55 PM
Contributors: Fabrice SALVAIRE
Next
Acknowledgements