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....

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

相关推荐
君顾16 分钟前
家校托管互通:从需求分析到系统架构的落地实践
java·开发语言·托管
jimy125 分钟前
c++隐式移动构造、强制拷贝省略、返回具名局部变量
开发语言·c++
v_for_van40 分钟前
C语言__attribute__
服务器·c语言·开发语言·mcu·嵌入式·嵌入式实时数据库
工业一体机老司机1 小时前
Python实现工业一体机Modbus-TCP通信-从协议解析到多设备轮询实战
开发语言·python·tcp/ip
fpcc1 小时前
跟我学C++中级篇—static_assert和assert
开发语言·c++
2401_885885041 小时前
国际语音php接口代码示例:PHP使用cURL快速调用语音发送API
android·开发语言·前端·人工智能·python·php·语音识别
萌动的小火苗1 小时前
Linux进程线程面试题【无答案】
linux·运维·服务器·c语言·开发语言
Zenova EdgeOS2 小时前
C++ 工业边缘 Boost.Asio 高级实战
开发语言·c++·边缘计算·工业网关
mqiqe2 小时前
AgentScope Java 2.0 技能仓库(Skill Repository)完全实战指南
java·开发语言·elasticsearch
人工干智能2 小时前
科普:Python中的生成器——带`yield`的函数
开发语言·python