Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

VS Code for Qt Applications - Part 1

A Technical Guide

A Visual Studio Code workspace is just a bundle of opened folders

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Build target1",
      "type": "shell"
      "command": "make /f ${workspaceFolder:folder1}/Makefile target1"
      "options": {
        "cwd": "${workspace:folder1}"
      }
    }
    // ... add more tasks here
  ]
}
Install-Module pscx
{
  "label": "Build target1",
  "type": "shell"
  "command": "Invoke-BatchFile 'PATH_TO_YOUR_VCVARS' ; nmake /f ${workspaceFolder:folder1}/Makefile target1"
  "options": {
     "cwd": "${workspace:folder1}"
  }
}
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "target1",
      "type": "cppvsdbg",
      "request": "launch",
      "program": "${workspaceFolder:folder1}/build/target1",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${workspaceFolder:folder1}/build",
      "environment": []
    }
    // ... add more targets here
  ]
}
{
  "folders": [ .... ],
  "settings": [ .... ],
  "tasks": [
    { ... first build conf ... },
    { ... second build conf ... }
  ],
  "launch": [
    { ... first run conf ... },
    { ... second run conf ... }
  ]
}
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.17763.0",
            "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "msvc-x64"
        }
    ],
    "version": 4
}

About KDAB


AlessandorAmbrosano

Alessandro Ambrosano

Senior Software Engineer

Learn Modern C++

Learn more