desktop-qt
Use when the user asks about Qt 6, QtWidgets, Qt Quick/QML, signals and slots, Qt Creator, CMake for Qt, PySide6/PyQt, model/view or deploying Qt apps with…
от j4flmao★ 47 звёзд на GitHub
Установить desktop-qt в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Qt
Purpose
Build cross-platform desktop (and embedded) applications using the Qt framework — QtWidgets for traditional desktop UIs, QtQuick/QML for fluid modern interfaces, with built-in networking, SQL, multimedia, and internationalization.
Agent Protocol
Trigger
Exact user phrases: "Qt", "QtWidgets", "QtQuick", "QML", "QObject", "signals and slots", "QMake", "CMake Qt", "QML application", "Qt Creator", "QML UI", "cross-platform Qt".
Input Context
- Qt version (Qt5 vs Qt6 — Qt6 for new projects)
- UI technology (QtWidgets vs QtQuick/QML)
- Build system (CMake with Qt6, qmake legacy)
- Platform targets (Windows, macOS, Linux, Android, iOS, embedded)
- Language (C++ primarily, Python via PySide6)
- Module requirements (QtCore, QtWidgets, QtQuick, QtNetwork, QtSql, QtMultimedia, QtCharts, QtWebEngine)
- Performance requirements (real-time rendering, large data models)
Output Artifact
Qt application architecture with widget/QML tree, signal-slot graph, data model, and deployment configuration.
Response Format
Qt: {6.x} UI: {QtWidgets|QtQuick|hybrid} Build: CMake
Objects: {QObject classes, signals -> slots}
Models: {QAbstractItemModel subclasses, roles}
Deployment: {windeployqt|macdeployqt|linuxdeploy}, license {LGPL|commercial}
Code: {files}
Completion Criteria
- Qt version and modules selected
- UI technology chosen (QtWidgets vs QtQuick vs hybrid)
- Application and main window class hierarchy defined
- Signal-slot connections mapped for data flow
- Model-View architecture (QAbstractItemModel, QSortFilterProxyModel)
- Settings and state persistence (QSettings)
- Internationalization setup (tr(), .ts/.qm files)
- Build system configured (CMake with Qt6)
- Deployment/packaging planned (windeployqt, macdeployqt, linuxdeployqt)
- Styling approach (Qt stylesheets, QML theming, platform-native look)
Max Response Length
250 lines.
Framework/Methodology
Qt UI Technology Decision Tree
What is the application type?
├── Traditional desktop (forms, dialogs, complex widgets)
│ → QtWidgets — mature, accessible, native look
│ → QMainWindow, QDialog, QFormLayout, QTableView
├── Modern fluid UI (animations, touch, customization)
│ → QtQuick/QML — GPU-accelerated, declarative
│ → QQC2 (Qt Quick Controls 2), animations, shader effects
├── Data-heavy (spreadsheets, financial, scientific)
│ → QtWidgets with QTableView + custom delegates
│ → OR QtQuick with TableView (Qt6) + custom models
├── Embedded (IoT, kiosk, in-vehicle)
│ → QtQuick with Qt Quick Ultralite (for MCUs)
│ └ Or QtWidgets for more complex interaction
└── Hybrid (some QML, some widgets)
→ QWidget::createWindowContainer for embedding QML
└ QQuickWidget for embedding into QtWidgets
Qt Object Model
QObject (base for all Qt objects)
├── Signals + Slots (type-safe communication)
├── Q_PROPERTY (property system for QML + data binding)
├── Q_INVOKABLE (methods callable from QML)
├── Event system (QEvent, eventFilter, QTimer)
├── QObject hierarchy (parent-child memory management)
└── Meta-object compiler (MOC) for introspection
↓
Inherited by:
├── QWidget / QMainWindow / QDialog (QtWidgets)
├── QQuickItem / QQuickWindow (QtQuick)
├── QAbstractItemModel / QAbstractListModel (Model/View)
└── QThread / QObject worker (concurrency)
Workflow
Step 1: Set Up CMake + Qt6 Project
cmake_minimum_required(VERSION 3.16)
project(MyApp VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt6 REQUIRED COMPONENTS
Core Widgets Sql Network Quick QuickControls2
)
add_executable(myapp
src/main.cpp
src/mainwindow.cpp src/mainwindow.h
src/mainwindow.ui
src/model.cpp src/model.h
resources.qrc
)
target_link_libraries(myapp PRIVATE
Qt6::Core Qt6::Widgets Qt6::Sql Qt6::Network
Qt6::Quick Qt6::QuickControls2
)
# QML module registration
qt_target_qml_sources(myapp
URI "org.example.myapp"
VERSION 1.0
QML_FILES
qml/Main.qml
qml/MyComponent.qml
)
Step 2: QtWidgets Application
// main.cpp
#include <QApplication>
#include <QMainWindow>
#include <QPushButton>
#include <QVBoxLayout>
#include <QLabel>
#include <QSettings>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
app.setApplicationName("My App");
app.setOrganizationName("My Org");
app.setApplicationVersion("1.0.0");
// Qt6 high-DPI is automatic
QMainWindow window;
window.setWindowTitle("My Qt App");
window.resize(800, 600);
auto *centralWidget = new QWidget(&window);
auto *layout = new QVBoxLayout(centralWidget);
auto *label = new QLabel("Hello, Qt!");
auto *button = new QPushButton("Click Me");
// Signal-slot connection
QObject::connect(button, &QPushButton::clicked, [label]() {
label->setText("Button clicke
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/qt-advanced.md
- references/qt-architecture.md
- references/qt-fundamentals.md
- references/qt-performance.md
- references/qt-qml-guide.md
- references/qt-setup.md
FAQ
Что делает скилл desktop-qt?
Use when the user asks about Qt 6, QtWidgets, Qt Quick/QML, signals and slots, Qt Creator, CMake for Qt, PySide6/PyQt, model/view or deploying Qt apps with windeployqt/macdeployqt; also KDE apps. Produces cross-platform Qt application code and build setup. Not for GTK (use desktop-gtk).
Как установить скилл desktop-qt?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл desktop-qt запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…