← ClaudeAtlas

qt-qmllisted

QML and Qt Quick — declarative UI language for modern Qt applications. Use when building a QML-based UI, embedding QML in a Python/C++ app, exposing Python/C++ objects to QML, creating QML components, or choosing between QML and widgets. Trigger phrases: "QML", "Qt Quick", "declarative UI", "QQmlApplicationEngine", "expose to QML", "QML component", "QML signal", "pyqtProperty", "QML vs widgets", "QtQuick.Controls", "Item", "Rectangle"
sleepyvani/tablemax · ★ 26 · API & Backend · score 60
Install: claude install-skill sleepyvani/tablemax
## QML and Qt Quick ### QML vs Widgets: When to Choose QML | Use QML when... | Use Widgets when... | |-----------------|---------------------| | Building modern, animated, fluid UIs | Building traditional desktop tools | | Targeting mobile or embedded | Heavy data tables and forms | | Designers are involved in the UI | Rich text editing required | | GPU-accelerated rendering needed | Complex platform widget integration | | Writing a new app from scratch | Extending an existing widget app | For new Python/PySide6 desktop applications, QML offers better visual results with less code. For data-heavy enterprise tools, widgets remain the pragmatic choice. **Bootstrap and architecture** — see [references/qml-architecture.md](references/qml-architecture.md) ### Official Best Practices (Qt Quick) **1. Type-safe property declarations** — Always use explicit types, not `var`: ```qml // WRONG — prevents static analysis, unclear errors property var name // CORRECT property string name property int count property MyModel optionsModel ``` **2. Prefer declarative bindings over imperative assignments:** ```qml // WRONG — imperative assignment overwrites bindings, breaks Qt Design Studio Rectangle { Component.onCompleted: color = "red" } // CORRECT — declarative binding, evaluates once at load Rectangle { color: "red" } ``` **3. Interaction signals over value-change signals:** ```qml // WRONG — valueChanged fires on clamping/rounding, causes event cascades Slider { onValueCh