Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. Inventory the project (step 1) before writing anything.
  2. Read only the references you need (table below). styling.md is mandatory for any port with a UI.
  3. Port in workflow order, building after each stage.
  4. Also use qt-qml for the QML you write, qt-cmake-project when restructuring CMake, and qt-canvas2d (its references/api-reference.md) as a second source on painter semantics.
  5. Verify (step 8). A port that was not built is not finished.
  6. 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); .ui files; .qss / setStyleSheet.
  • Custom painting: paintEvent|QPainter|drawText|drawPixmap|QGraphicsView|QGraphicsScene|QOpenGLWidget (QOpenGLWidget is 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_DontUseNativeMenuBar keeps menus in the window on macOS).
  • Compile-time macros in UI text: QT_VERSION_STR|_VERSION\b|__DATE__ (QML
Полный SKILL.md на GitHub

Установить qt-widgets-to-quick в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/analogclock_quick/CMakeLists.txtexamples/analogclock_quick/Main.qmlexamples/analogclock_quick/analogclock.cppexamples/analogclock_quick/analogclock.hexamples/analogclock_quick/analogclockrenderer.cppexamples/analogclock_quick/analogclockrenderer.hexamples/analogclock_quick/main.cppexamples/analogclock_widgets/CMakeLists.txtexamples/analogclock_widgets/analogclock.cppexamples/analogclock_widgets/analogclock.hexamples/analogclock_widgets/main.cppexamples/basiclayouts_quick/CMakeLists.txtexamples/basiclayouts_quick/Main.qmlexamples/basiclayouts_quick/appbackend.cppexamples/basiclayouts_quick/appbackend.hexamples/basiclayouts_quick/main.cppexamples/basiclayouts_quick/qtquickcontrols2.confexamples/basiclayouts_widgets/CMakeLists.txtexamples/basiclayouts_widgets/main.cppexamples/basiclayouts_widgets/mainwindow.cppexamples/basiclayouts_widgets/mainwindow.hreferences/application-structure.mdreferences/cmake.mdreferences/cpp-qml-integration.mdreferences/custom-painted-items.mdreferences/graphics-view-to-canvaspainter.mdreferences/large-app-porting.mdreferences/layouts.mdreferences/painting-qpainter-to-canvaspainter.mdreferences/performance.mdreferences/styling.mdreferences/widget-mapping.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить qt-widgets-to-quick с