A comprehensive VS Code extension that brings Qt Creator's essential features to Visual Studio Code, making it Qt C++ developer-friendly on Windows.
Features
🔨 Build System Integration
- Auto-detect Qt Projects: Automatically finds
.pro(QMake),CMakeLists.txt(CMake), Python Qt, and raw C++ Qt projects - Build Commands: Build, Clean, Rebuild, Quick Build, and Run your Qt projects with a single command
- Parallel Builds: Auto-detects
jomfor MSVC; configurable job count for make/MinGW - Pre/Post Build Hooks: Configure custom commands to run before and after every build
🧰 Qt Installation & Toolchain
- Auto-detection: Finds Qt via
QTDIR, PATH, common install directories, and package managers - Package Manager Support: Homebrew, APT, Pacman, vcpkg, Conan, aqtinstall
- Multi-version Switching: Quick Pick to switch between detected Qt versions
- Cross-platform: Windows (MSVC/MinGW), macOS (Clang), Linux (GCC/Clang)
🎯 Available Commands
Access these commands via Command Palette (Ctrl+Shift+P):
Build & Run
Qt: Build Project— Build the current Qt projectQt: Quick Build— Skip reconfiguration if build directory existsQt: Clean Project— Clean build artifactsQt: Rebuild Project— Clean and rebuildQt: Run Project— Run the built executableQt: Select Build Configuration— Switch Debug / Release per project
Qt Asset Integration
Qt: Open in Qt Designer— Edit.uifiles in Qt DesignerQt: Validate Resource File— Validate.qrcfilesQt: Compile Resource File (rcc)— RunrccmanuallyQt: Deploy Application— Runwindeployqt/macdeployqt/linuxdeployqtQt: Build Android APK— Build Android APK viaandroiddeployqt(or Gradle wrapper when available)Qt: Build Android AAB— Build Android App BundleQt: Build Android APKS from AAB— Convert AAB to APKS withbundletoolQt: Install Android APKS— Install APKS on device viabundletoolQt: Validate Android Manifest— CheckAndroidManifest.xmlfor common Qt issuesQt: Start Android Logcat/Qt: Stop Android Logcat— Stream device logs in output channel- Android NDK auto-detection from SDK
ndk/orndk-bundle/directories Qt: Configure Android SDK— Set Android SDK/NDK pathsQt: Install Android APK— Install APK to connected device viaadbQt: Build iOS App— Build iOS app for simulator or device (macOS only)Qt: Select iOS Simulator— Pick iPhone/iPad simulator fromxcrun simctlQt: Select iOS Signing Identity— Pick a code-signing identity from the keychainQt: Select iOS Provisioning Profile— Pick a provisioning profile installed on your MacQt: Run iOS App on Simulator— Build, install, and launch on selected simulatorQt: Archive iOS App—xcodebuild archivefor device distribution with signingQt: Export iOS IPA—xcodebuild -exportArchivewith signing-aware ExportOptions.plistQt: Upload iOS IPA to TestFlight— Upload exported IPA viaxcrun altoolQt: Take iOS Simulator Screenshot— Capture simulator screenQt: Record iOS Simulator Video/Qt: Stop Simulator Recording— Record simulator videoQt: Build for WebAssembly— Build Qt app for WASM via Emscripten (with source maps in debug, pthread detection)Qt: Configure Emscripten SDK— Set Emscripten path for WASM buildsQt: Serve WebAssembly Preview— Start local HTTP server for WASM output
Build Kits
Qt: Detect Build Kits— Auto-generate kits from Qt installationsQt: Select Build Kit— Per-project kit selectionQt: Configure Build Kit— Edit kit build directory template, extra args, env vars, cross-compile prefixQt: Configure Kit Toolchain— Assign CMake toolchain file to a kitQt: Validate Build Kit— Verify kit paths, qmake, compiler, toolchain compatibilityQt: Export Build Kits— Save kit definitions as JSONQt: Import Build Kits— Load kit definitions from JSON- Per-kit build directories with variable substitution
- Kit-specific deploy directories
- Cross-compile prefix support per kit
- Sysroot path support per kit
- CMake toolchain file injection into build tasks
- Workspace default kit fallback
- Yocto SDK auto-detection with sysroot/cross-prefix/toolchain population
QML Support
Qt: Format QML File— Format withqmlformatQt: Lint QML File— Lint withqmllint(auto-lint on save)Qt: Preview QML File— Launchqmlscenewith the current fileQt: Stop QML Preview— Stop the running QML preview- QML Language Server (
qmlls) — Real QML IntelliSense via Qt 6.2+ LSP (completions, diagnostics, hover, rename) - Hot reload — Auto-restart
qmlsceneon QML file save (qt.qmlPreviewHotReload)
Qt C++ Language Server
- Signal/slot-aware completions inside
connect()calls - MOC-aware IntelliSense v2 — after a
Q_PROPERTYaccess such asmyObject->myProperty., get type-specific completions (e.g.,QStringmethods for aQStringproperty) SIGNAL()/SLOT()macro go-to-definition- Find all references across
connect()calls andemitsites - Rename refactoring for signals, slots, and
Q_PROPERTY - Diagnostics: missing
Q_OBJECT, old-styleconnect()usage - Quick fixes: add
Q_OBJECT, modernizeconnect()to function pointers - Auto-starts a stdio LSP server (
out/qtCppLanguageServer.js) for C++ files - Settings:
qt.cppLspEnable,qt.cppLspServerPath,qt.cppLspDiagnosticsEnable
QML-C++ Bridge
Qt: Rebuild QML-C++ Index— Rebuild cross-language index- Go to C++ Definition (
F12) from QML property bindings and method calls jumps to the C++Q_PROPERTY/Q_INVOKABLEdeclaration, including inherited properties - Find QML Usages from C++ (
Shift+F12) onQ_INVOKABLE/Q_PROPERTYfinds usages scoped to the correct QML type - Rename QML-Registered C++ Class (
F2) on aQML_ELEMENTclass updates all.qmlinstantiations - Inheritance-aware navigation — resolves symbols across the QML type inheritance chain
- QML_ATTACHED support — Attached property completions and hover
- QML Type Inference — Resolve custom QML types defined in C++ via
QML_ELEMENT/QML_SINGLETON - QML Module Support — Parse
qmldirfiles, navigate to imported QML types, auto-configureQML_IMPORT_PATH
Code Generation
Qt: Generate MOC/Qt: Generate UIC/Qt: Generate RCC— Manual code generationQt: Go to Generated Code(Alt+G) — Jump tomoc_*.cpp,ui_*.h,qrc_*.cppQt: Peek Generated Code(Alt+Shift+G) — Inline peek at generated code- Auto-generation on save:
qt.autoMoc,qt.autoUic,qt.autoRcc
Precompiled Headers (PCH)
Qt: Generate Precompiled Header— Interactive PCH generation with 50+ Qt headersQt: Integrate Precompiled Header into Build— Auto-inject into.proorCMakeLists.txtQt: Configure PCH Compiler Flags— Direct compiler flag configuration
Debugger
Qt: Generate Debug Launch Configuration— Auto-createlaunch.jsonQt: Setup Qt Pretty Printers— GDB/LLDB pretty printers for Qt typesQt: Add Signal/Slot Breakpoint— Trace signal/slot connections
Testing
- Auto-discover Qt Test classes and populate the native Test Explorer
- Auto-discover QML
TestCaseitems and run viaqmltestrunner - Run and Debug Qt Tests directly from the sidebar
Internationalization
Qt: Update Translations (lupdate)/Qt: Compile Translations (lrelease)Qt: Open in Qt Linguist— Edit.tsfiles in Qt Linguist- Translation progress shown in sidebar with completion percentage
Qt for Python
Qt: Compile .ui to Python—pyside6-uic/pyuic5Qt: Compile .qrc to Python—pyside6-rcc/pyrcc5Qt: Open Qt Designer (Python)— Launch designer for Python bindings
Build Analytics & Optimization
Qt: Show Build Analytics— Sidebar with build history, durations, success rates- Build regression alerts — Warning icon when last build is > 1.5x average duration
- Proactive ccache suggestion — Auto-suggests enabling ccache after slow builds
- Per-file compilation timing — See the slowest
.cppfiles in the Build Analytics view (powered by captured build output; most accurate with CMake+Ninja) Qt: Configure ccache/sccache— Auto-detect and configure compiler cacheQt: Show ccache Stats— View cache hit/miss statisticsQt: Detect Slow Compilation Targets— Identify slowest.cppfiles by complexityQt: Select CMake Preset— UseCMakePresets.jsonconfigure/build presets in tasksQt: Clear CMake Preset— Revert to default CMake behavior
Code Quality
Qt: Run Health Check— Validate Qt, compiler, debugger, kits, Android/iOS/WASM configs, IntelliSenseQt: Run clazy / clang-tidy on Workspace— Qt-specific static analysisQt: Run clazy / clang-tidy on Current File— Single-file analysis- clazy quick fixes — One-click Code Actions for
clazy-old-style-connect,clazy-missing-tr, and more .clang-tidyconfig detection — Automatically reads project-level.clang-tidy/_clang-tidy- Settings:
qt.clazyEnable,qt.clazyChecks,qt.clazyOnSave
Qt Documentation
Qt: Open Qt Documentation— Browse local Qt docs in VS Code webview- Hover fallback to offline docs when available, otherwise online
doc.qt.io
Profiling & Diagnostics
Qt: Launch QML Profiler— Run app with QML debugging and connect Qt CreatorQt: Launch CPU Profiler— Launchperf,Instruments,sample, orVTuneQt: Launch Memory Leak Detector— Runvalgrind,Dr. Memory, orleaks
CI/CD & Deployment
Qt: Setup CI/CD Pipeline— Generate GitHub Actions and GitLab CI templatesQt: Generate Installer Framework Config— Createconfig.xml/package.xmlQt: Build Installer— Runbinarycreatorfor.exe/.dmg/.runQt: Configure Remote Target— Set host, user, remote path, deploy modeQt: Deploy to Remote Device— SCP/RSYNC built artifacts to embedded targetQt: Generate Remote Debug Config— Createcppdbglaunch config for GDB/LLDB remote debugging
⚙️ Configuration
Configure the extension via VS Code settings (File > Preferences > Settings or Ctrl+,):
{
"qt.qmakePath": "", // Path to qmake (auto-detected if empty)
"qt.qtInstallPath": "", // Qt installation directory
"qt.autoDetect": "on", // Auto-detect Qt projects
"qt.buildDirectory": "${workspaceFolder}/build", // Build output directory
"qt.defaultBuildType": "debug", // debug or release
"qt.makeCommand": "auto", // auto, nmake, mingw32-make, jom, or make
"qt.additionalQMakeArguments": "", // Extra qmake arguments
"qt.additionalCMakeArguments": "", // Extra CMake arguments
"qt.showBuildOutput": true, // Show build output
"qt.clearOutputBeforeBuild": true, // Clear terminal before build
"qt.parallelJobs": 0, // Parallel jobs (0 = auto)
"qt.useCcache": false, // Use ccache/sccache
"qt.qmlFormatOnSave": false, // Auto-format QML on save
"qt.qmlLintOnSave": true, // Auto-lint QML on save
"qt.qmlPreviewHotReload": false, // Restart qmlscene on QML save
"qt.qmlCppBridgeEnabled": true, // Enable QML-C++ bridge
"qt.autoMoc": false, // Auto-run moc on header save
"qt.autoUic": false, // Auto-run uic on .ui save
"qt.autoRcc": false, // Auto-run rcc on .qrc save
"qt.testAutoDiscover": true, // Auto-discover Qt Test classes
"qt.debuggerType": "auto", // auto, cppvsdbg, gdb, lldb
"qt.iosBuildForDevice": false, // Build iOS for physical device
"qt.iosSigningIdentity": "", // iPhone Developer/Distribution identity
"qt.iosProvisioningProfile": "", // Provisioning profile UUID
"qt.iosTeamId": "", // Apple Team ID
"qt.iosExportMethod": "development" // development, app-store, ad-hoc, enterprise
}
📊 Telemetry
Qt C++ Tools includes an opt-in, disabled-by-default telemetry feature to help guide future development.
- No PII is collected. Events include only anonymous metadata such as command IDs, build durations/outcomes, feature-flag snapshots, activation counts, platform, extension version, and timestamp.
- You control it. Use
Qt: Configure Telemetryto enable or disable telemetry at any time, or setqt.telemetryEnabledin settings. - Local by default. Events are stored locally in the extension's global storage. Use
Qt: Export Telemetry Datato inspect the queued events. - Optional remote flush. If you configure
qt.telemetryEndpoint, enabled events are flushed periodically to that HTTPS endpoint.
Requirements
Software Requirements
- VS Code: Version 1.85.0 or higher
- Node.js: Version 18.x or higher (for development only)
- Qt: Qt 5.x or Qt 6.x installation
- Compiler:
- MSVC (Visual Studio 2017/2019/2022) or
- MinGW (typically bundled with Qt)
Qt Installation Detection
The extension automatically searches for Qt in:
- Configured paths (
qt.qmakePathorqt.qtInstallPath) QTDIRenvironment variable- System PATH
- Common installation directories:
C:\QtC:\Program Files\Qt%USERPROFILE%\Qt
Installation
Method 1: From VSIX (Recommended for Testing)
-
Build and Install Using Script:
# Navigate to extension directory cd "C:\Users\Akhil\OneDrive\Documents\Github Projects\Qt-VSC-Extension" # Run installation script .\install.ps1 -
Restart VS Code or reload window (
Ctrl+Shift+P→ "Reload Window")
Method 2: Manual Installation
-
Install Dependencies:
npm install -
Compile TypeScript:
npm run compile -
Package Extension:
npm run package -
Install VSIX:
code --install-extension qt-vsc-extension-1.16.0.vsix --force
Method 3: Development Mode
For development and testing:
- Open this folder in VS Code
- Press
F5to launch Extension Development Host - Test the extension in the new window
Quick Start
For Existing Qt Projects
-
Open Your Qt Project:
- Open a folder containing
.proorCMakeLists.txtfiles
- Open a folder containing
-
Build Your Project:
- Press
Ctrl+Shift+P - Type "Qt: Build Project"
- Or use
Ctrl+Shift+Bto see all build tasks
- Press
-
Run Your Application:
- Press
Ctrl+Shift+P - Type "Qt: Run Project"
- Press
Configure Qt Path (if not auto-detected)
- Press
Ctrl+Shift+P - Type "Qt: Configure Qt Installation Path"
- Navigate to your
qmake.exe(e.g.,C:\Qt\6.5.0\msvc2019_64\bin\qmake.exe)
Supported Project Types
QMake Projects (.pro files)
- Standard Qt widget applications
- Qt Quick/QML applications
- Qt libraries
- Subdirs projects
CMake Projects (CMakeLists.txt)
- Projects using
find_package(Qt5 ...)orfind_package(Qt6 ...) - Projects with
CMAKE_AUTOMOC,CMAKE_AUTOUIC,CMAKE_AUTORCC
Extension Architecture
Qt-VSC-Extension/
├── src/
│ ├── extension.ts # Main extension entry point
│ ├── qtConfigManager.ts # Qt installation detection & config
│ ├── qtProjectDetector.ts # Project file scanning & parsing
│ ├── qtTaskProvider.ts # Task provider for build/clean/run
│ ├── qmlSupport.ts # QML format, lint, preview
│ ├── qmlCppBridge.ts # QML-C++ cross-language indexer
│ ├── qmlCppBridgeProviders.ts # Definition, completion, hover, reference providers
│ ├── qtDebugger.ts # Debug configuration & pretty printers
│ ├── qtTestFramework.ts # Qt Test discovery & execution
│ ├── qtBuildAnalytics.ts # Build history & ccache/sccache
│ ├── qtProfiling.ts # QML/CPU/Memory profilers & slow target detection
│ └── ... (30+ modules)
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── .vscode/
├── launch.json # Debug configuration
└── tasks.json # Build tasks
Troubleshooting
Extension Not Finding Qt
-
Manual Configuration:
{ "qt.qmakePath": "C:\\Qt\\6.5.0\\msvc2019_64\\bin\\qmake.exe" } -
Check Output Channel:
View→Output- Select "Qt C++ Tools" from dropdown
- Look for detection logs
Build Fails
-
Verify Compiler:
- Ensure MSVC or MinGW is installed and accessible
- For MSVC: Open VS Code from "Developer Command Prompt"
-
Check Build Directory:
- Default:
${workspaceFolder}/build - Ensure write permissions
- Default:
-
Problem Matchers:
- Extension includes
$msCompile,$gcc, andqt-qmakeproblem matchers - Build errors should appear in Problems panel (
Ctrl+Shift+M)
- Extension includes
Multiple Qt Versions
Use Qt: Select Qt Version command to switch between detected installations.
Roadmap
See ROADMAP.md for a detailed, versioned breakdown of completed features and upcoming work.
Quick summary:
- ✅ v0.0.1 — Build, Clean, Rebuild, Run; QMake & CMake support; Qt auto-detection; MSVC/MinGW; Status bar & sidebar UI
- ✅ v0.1.0 — Project creation wizards (QMake & CMake)
- ✅ v0.2.0 — Qt Designer integration,
.ui/.qrcsupport - ✅ v0.3.0 —
windeployqtdeployment, IntelliSense helper - ✅ v0.4.0 — Qt code intelligence (autocomplete, snippets, hover docs)
- ✅ v0.5.0 — Enhanced sidebar, build config selector, Qt Creator import
- ✅ v0.6.0 — Parallel build control, incremental build optimization, build error quick-fixes
- ✅ v1.0.0 — Cross-platform support (Windows, macOS, Linux)
- ✅ v1.1.0 — Package manager integration (Homebrew, APT, Pacman, vcpkg, Conan, aqtinstall)
- ✅ v1.2.0 — QML language support (syntax highlighting, formatter, linter, preview)
- ✅ v1.3.0 — QML-C++ Bridge (Go to Definition, Find References, autocomplete)
- ✅ v1.4.0 — Debugging integration (launch.json generation, pretty printers, signal/slot breakpoints)
- ✅ v1.5.0 — Qt Test Framework integration (Test Explorer)
- ✅ v1.6.0 — Internationalization (lupdate, lrelease, Qt Linguist)
- ✅ v1.7.0 — Qt for Python (PySide/PyQt) support
- ✅ v1.8.0 — Advanced code generation (MOC, UIC, RCC automation)
- ✅ v1.9.0 — Generated code navigation & PCH support
- ✅ v1.10.0 — Custom build system & PCH build integration
- ✅ v1.11.0 — Build script injection & direct PCH compiler configuration
- ✅ v1.12.0 — CI/CD integration (GitHub Actions, GitLab CI)
- ✅ v1.13.0 — Qt Installer Framework integration
- ✅ v1.14.0 — Build analytics & compiler cache (ccache/sccache)
- ✅ v1.15.0 — Profiling & performance diagnostics (QML Profiler, CPU Profiler, Memory Leak Detection, Slow Target Detection)
- ✅ v1.16.0 — QML type inference (
QML_ELEMENT/QML_SINGLETON) & hot reload on save - ✅ v1.17.0 (Shipped) — QML Language Server (
qmlls) & Modern CMake Preset Support - ✅ v1.18.0 (Shipped) — QML Testing (
qmltestrunner) & Qt Code Quality (clazy, offline docs) - ✅ v1.19.0 (Shipped) — Android Deployment & Build Kit Profiles
- ✅ v1.20.0 (Shipped) — iOS Deployment & Qt for WebAssembly
- ✅ v2.0.0 (Shipped) — Completeness & Polish
- ✅ v2.1.0 (Shipped) — Advanced Mobile & Embedded (TestFlight, bundletool, logcat, remote deploy/debug, Yocto, sysroot)
- ✅ v2.2.0 (Shipped) — LSP & Deep Code Intelligence (custom Qt C++ LSP server, signal/slot rename, cross-reference)
- ✅ v2.3.0 (Current) — Extension icon and branding
Contributing
This extension is in active development. Contributions, issues, and feature requests are welcome!
Development Setup
- Clone the repository
- Install dependencies:
npm install - Open in VS Code
- Press
F5to launch Extension Development Host
Building
npm run compile # Compile TypeScript
npm run watch # Watch mode for development
npm run package # Create .vsix package
License
MIT License - See LICENSE file for details
Credits
Created by Akhil Pawar
Inspired by Qt Creator's workflow
Support
- Issues: Report bugs or request features via GitHub Issues
- Documentation: See this README and inline code documentation
- Output Channel: Check "Qt C++ Tools" output for logs and diagnostics
Happy Qt Development in VS Code! 🚀