qt-widgets-to-quick
БесплатноБез исполняемых скриптовНе проверенPorts Qt Widgets (QtWidgets, QWidget, QMainWindow, QDialog, .ui files, QPainter paintEvent) applications to Qt Quick: UI becomes QML with Qt Quick Controls…
от TheQtCompanyRnD★ 579 звёзд на GitHubОб этом скилле
Qt Widgets → Qt Quick porting
Goal: turn a QtWidgets application into a Qt Quick application that looks and behaves the same, is idiomatic QML/C++, and builds cleanly.
| Widgets code | Becomes |
|---|---|
Widget UI, layouts, dialogs, menus, .ui |
QML + Qt Quick Controls + Qt Quick Layouts |
Custom QWidget with paintEvent / QPainter |
QCanvasPainterItem + QCanvasPainterItemRenderer using QCanvasPainter (Qt6::CanvasPainter, GPU, HTML-Canvas-like API) |
| Logic, models, I/O, networking, business classes | stays C++, exposed with QML_ELEMENT / QML_SINGLETON / Q_PROPERTY |
Do not answer API questions from memory. The references list the classes and
members that matter; for anything not listed, check the Qt docs (the qt-docs
MCP tools, if available) or the installed headers (include/QtCanvasPainter/).
How to apply
- Inventory the project (step 1) before writing anything.
- Read only the references you need (table below).
styling.mdis mandatory for any port with a UI. - Port in workflow order, building after each stage.
- Also use
qt-qmlfor the QML you write,qt-cmake-projectwhen restructuring CMake, andqt-canvas2d(itsreferences/api-reference.md) as a second source on painter semantics. - Verify (step 8). A port that was not built is not finished.
- Report what was mapped, what had no direct equivalent and what you chose, and what is left for the user (QSS visuals, native dialogs, …).
| Need | Read |
|---|---|
| Which Controls type replaces a widget; event → handler mapping | references/widget-mapping.md |
| Layouts, size policies, stretch, splitters, scroll areas, form layouts | references/layouts.md |
QMainWindow, menus, toolbars, dialogs, actions, .ui, main.cpp |
references/application-structure.md |
| C++ ↔ QML bridge, models, signals/slots | references/cpp-qml-integration.md |
| Style selection, palette, QSS, fonts, icons, High-DPI | references/styling.md |
QPainter / paintEvent code |
references/painting-qpainter-to-canvaspainter.md, references/custom-painted-items.md |
| CMake | references/cmake.md |
| Large or multi-window app, staged port, modal prompts, export, tests | references/large-app-porting.md |
QGraphicsScene as the document model, or QGraphicsView with many simple items |
references/graphics-view-to-canvaspainter.md |
| Many items per frame, slower than the original, benchmarking | references/performance.md |
| Worked before/after projects | examples/ (bottom of this file) |
Workflow
1. Inventory the source
Grep and write a short table (in your reasoning or the reply):
- Widget classes:
QWidget|QMainWindow|QDialog|QFrame|Q\w+(Edit|Box|Button|View|Widget|Bar|Menu|Label);.uifiles;.qss/setStyleSheet. - Custom painting:
paintEvent|QPainter|drawText|drawPixmap|QGraphicsView|QGraphicsScene|QOpenGLWidget(QOpenGLWidgetis not covered by QCanvasPainter; see "Hard cases"). - Input:
mousePressEvent|keyPressEvent|wheelEvent|eventFilter|dragEnterEvent|contextMenuEvent|resizeEvent. - Models:
QAbstractItemModel|QStandardItemModel|QSortFilterProxyModel|QStyledItemDelegate(usually reusable unchanged). - Logic to keep:
QTimer|QThread|QSettings|QTranslator|tr(. - Modal calls:
exec(),QMessageBox,QFileDialog,QInputDialog. - App setup that must survive:
setAttribute\(Qt::AA_|setNativeMenuBar(e.g.AA_DontUseNativeMenuBarkeeps menus in the window on macOS). - Compile-time macros in UI text:
QT_VERSION_STR|_VERSION\b|__DATE__(QML
Установить qt-widgets-to-quick в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл qt-widgets-to-quick?
Ports Qt Widgets (QtWidgets, QWidget, QMainWindow, QDialog, .ui files, QPainter paintEvent) applications to Qt Quick: UI becomes QML with Qt Quick Controls and Qt Quick Layouts, custom QPainter widgets become QCanvasPainterItem + QCanvasPainterItemRenderer using QCanvasPainter (Qt 6.12+). Use whenever the user wants to migrate, port, convert, modernize or rewrite a Widgets application, window, dialog, custom widget or layout to QML / Qt Quick / Qt Quick Controls, or asks what the Qt Quick equivalent of a widget, layout, QAction, model view, QSS style sheet or paintEvent is. Do NOT trigger for new Qt Quick work with no Widgets source, for QPainter code that must stay on QtWidgets, or for Canvas2D (QML) drawing only (use qt-canvas2d).
Как установить скилл qt-widgets-to-quick?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл qt-widgets-to-quick запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This 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…
от Anthropic