vscode 配置构建、调试QT项目

  1. 背景是已经安装好了QT和QT相关的所有依赖包 https://mp.csdn.net/mp_blog/creation/editor/142974086

  2. 配置环境变量

找不到或者忘记在哪里可以使用指令查询

3.插件安装Qt Support、 Qt tools、Qt UI等

Cmake、Cmake Tools 等

C/C++等

settings.json 配置

此部分是根据一些报错进行配置更新的

vscode:插件报错:_unable to determine what cmake generator to use. p-CSDN博客

javascript 复制代码
{
  "workbench.colorTheme": "Default Dark Modern",
  "git.autofetch": true,
  "settingsSync.ignoredSettings": [],
  "editor.tabSize": 2,
  "eslint.format.enable": true,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "liveServer.settings.donotShowInfoMsg": true,
  "javascript.format.enable": false,
  "js/ts.implicitProjectConfig.target": "ESNext",
  "editor.codeActionsOnSave": {},
  "editor.detectIndentation": false,
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[dart]": {
    "editor.formatOnSave": false,
    "editor.formatOnType": true,
    "editor.rulers": [80],
    "editor.selectionHighlight": false,
    "editor.suggestSelection": "first",
    "editor.tabCompletion": "onlySnippets",
    "editor.wordBasedSuggestions": "off"
  },
  "editor.fontLigatures": false,
  "window.zoomLevel": 2,
  "cssrem.rootFontSize": 37.5,
  "git.confirmSync": false,
  "cmake.generator": "MinGW Makefiles",
  "cmake.pinnedCommands": [
    "workbench.action.tasks.configureTaskRunner",
    "workbench.action.tasks.runTask"
  ],
  "cmake.options.statusBarVisibility": "visible",
  "cmake.cmakePath": "C:\\Users\\Administrator\\Desktop\\qtServer\\Tools\\CMake_64\\bin\\cmake.exe",
  "qt-support.qtInstallDirectories": [],
  "cmake.additionalKits": [
    "C:\\Users\\Administrator\\AppData\\Local\\qt-support\\qt-kits.json"
  ],
  "C_Cpp.intelliSenseEngine": "disabled"
}

点击下图左下角,选择Qt 6.7.3....

开启构建,成功构建 ,几个调试、构建操作

相关推荐
LCS-31218 分钟前
Python爬虫实战: 爬虫常用到的技术及方案详解
开发语言·爬虫·python
枫の准大一19 分钟前
【C++游记】List的使用和模拟实现
开发语言·c++·list
qq_4335545426 分钟前
C++深度优先搜素
开发语言·c++·深度优先
小xin过拟合2 小时前
day20 二叉树part7
开发语言·数据结构·c++·笔记·算法
啟明起鸣3 小时前
【数据结构】B 树——高度近似可”独木成林“的榕树——详细解说与其 C 代码实现
c语言·开发语言·数据结构
十八旬3 小时前
苍穹外卖项目实战(日记十)-记录实战教程及问题的解决方法-(day3-2)新增菜品功能完整版
java·开发语言·spring boot·mysql·idea·苍穹外卖
这周也會开心4 小时前
Java-多态
java·开发语言
Forward♞4 小时前
Qt——网络通信(UDP/TCP/HTTP)
开发语言·c++·qt
XH华4 小时前
C语言第十三章自定义类型:联合和枚举
c语言·开发语言
2401_858286114 小时前
OS26.【Linux】进程程序替换(下)
linux·运维·服务器·开发语言·算法·exec·进程