qt-project

Generates and edits Qt 6 CMake projects using modern qt_* commands and QML modules.

1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/TypeThe0ry/Multi-Detect --skill qt-project-typethe0ry
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: qt-project
Source: https://github.com/TypeThe0ry/Multi-Detect/tree/main/ground-control/MultiDetectGCS/tools/skills/qt-project
Command: npx skills add https://github.com/TypeThe0ry/Multi-Detect --skill qt-project-typethe0ry

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? LLMs systematically produce outdated Qt build code — qmake .pro leftovers, legacy qt5_* macros, raw .qrc files for QML, and invented qt_add_qml_module argument names. This Skill corrects those biases and produces CMakeLists.txt files that follow the modern Qt 6 CMake API. ## Core Features & Use Cases - Project Bootstrapping: Creates fresh Qt 6 projects with the correct top-level layout, qt_standard_project_setup(), and versioned find_package(Qt6 6.8 REQUIRED) calls. - Target & Module Management: Adds executables (qt_add_executable), libraries (qt_add_library), plugins (qt_add_plugin), and QML modules (qt_add_qml_module) with correct URI/directory structure and TARGET-based imports. - Bias-Correction Checklist: Verifies every generated CMake output against 14 documented LLM mistakes before responding, migrating defective legacy patterns in existing files. - Use Case: Ask the agent to add a reusable QML control to an existing Qt Quick app, and it places the UpperCamelCase .qml file in the right module directory, updates QML_FILES, and wires IMPORTS TARGET correctly. ## Quick Start Ask the agent to create a new Qt 6 Quick application project with CMake, a Main.qml file, and a QML module named MyQmlModule.

Frequently Asked Questions about qt-project

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Qt 6 project with CMake?▼

Create a CMakeLists.txt with cmake_minimum_required(VERSION 3.16), set CMAKE_CXX_STANDARD 17, call find_package(Qt6 6.8 REQUIRED COMPONENTS Quick), then qt_standard_project_setup(REQUIRES 6.8), and declare targets with qt_add_executable and qt_add_qml_module.

How to add a QML file to an existing Qt CMake project?▼

Create the .qml file with an UpperCamelCase name in the module's directory, then add it to the QML_FILES list of that directory's qt_add_qml_module call. Never add .qml files via qt_add_resources or a hand-written .qrc file.

What is the difference between qt_add_executable and add_executable?▼

qt_add_executable auto-links Qt::Core, handles target finalization, and creates a MODULE library for Android APK packaging. Plain add_executable skips all Qt-specific handling and should not be used in Qt 6 projects.

Does qt_add_qml_module support SOURCE_FILES or QML_SOURCES arguments?▼

No, those argument names do not exist. Use QML_FILES for QML files, SOURCES for C++ files, RESOURCES for assets, URI for the module name, and RESOURCE_PREFIX instead of QRC_PREFIX.

Why does my QML import fail with module not found at runtime?▼

The directory structure does not match the dotted module URI, so the QML engine cannot resolve the import path. On Qt 6.8+, use the TARGET <cmake-target> form of IMPORTS and DEPENDENCIES, which derives import paths from target metadata.

Can I use qmake .pro files alongside CMakeLists.txt?▼

Maintaining both build systems for one project causes drift and divergent builds, and the QML compiler and language server only fully work with CMake. Pick one build system; dual builds are only justified for legacy Qt-internal modules.