A structured, hands-on guide to mastering QML (Qt Markup Language) and Qt Quick — from foundational concepts to advanced techniques.
This repository contains:
- QML_Roadmap.md — A comprehensive learning roadmap organized into phases
- QMLBasics/ — Practical examples and code for Phase 1 (Foundations)
basicqml.md— QML syntax quick referenceMain.qml— Interactive example demonstrating core conceptsmain.cpp— Qt application entry pointCMakeLists.txt— Build configuration
- QML syntax & structure
- Basic types & elements (Rectangle, Text, Image, etc.)
- Property bindings & signals
- Positioning & layouts (anchors)
Get started: Run the QMLBasics example to see all Phase 1 concepts in action on one screen.
Planned coverage includes Qt Quick Controls, advanced layouts, state management, animations, and more. See QML_Roadmap.md for the full roadmap.
- Qt 6.x (or Qt 5.15+)
- CMake 3.16+
- A C++ compiler (MSVC, GCC, or Clang)
- Qt Creator (optional, but recommended)
# Clone the repository
git clone https://github.com/mahtab04/QML-Learning.git
cd QML-Learning
# Create build directory
mkdir build
cd build
# Configure with CMake
cmake ..
# Build
cmake --build .
# Run the application
./QMLBasics # or QMLBasics.exe on Windows- Open
QMLBasics/CMakeLists.txtas a project in Qt Creator - Configure with your Qt kit
- Press Ctrl+R to build and run
- Read the roadmap (
QML_Roadmap.md) to understand the learning structure - Review quick notes (
QMLBasics/basicqml.md) for syntax reference - Run the example to see concepts in action
- Modify the code — Change values, properties, and colors to experiment
- Follow the practice exercises listed in
basicqml.md
| File | Purpose |
|---|---|
QML_Roadmap.md |
Complete learning roadmap (Phases 1-6) |
QMLBasics/basicqml.md |
QML syntax quick reference & practice guide |
QMLBasics/Main.qml |
Interactive QML example (all Phase 1 concepts) |
QMLBasics/main.cpp |
Qt application launcher |
QMLBasics/CMakeLists.txt |
Build configuration |
The QMLBasics/Main.qml demonstrates:
- ✅ Basic Rectangle and Text elements
- ✅ Property bindings (dynamic sizing)
- ✅ Mouse interaction & signal handlers
- ✅ Anchor-based positioning
- ✅ Toggle state management with signals
- This project is organized for progressive learning — concepts build on previous phases
- Each example is kept minimal to focus on core concepts
- Comments in code explain what each section does and why
- Practice exercises encourage experimentation and deeper understanding
MIT License — Feel free to use this for learning and teaching.
Have improvements or additional examples? Feel free to fork and submit a pull request!
Happy Learning! 🎉 Start with Phase 1, run the examples, and explore the code.