如何在 Visual Studio Code 中使用 Qt? [英] How use Qt in Visual Studio Code?

查看:157
本文介绍了如何在 Visual Studio Code 中使用 Qt?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Visual Studio Code 操作系统 Linux Mint 18 中使用 Qt?

How do I use Qt in Visual Stuidio Code operating system Linux Mint 18?

市场不存在 Qt 的扩展.也许有人知道更多!

Marketplace doesnt exist extension for Qt. Maybe anyone knows more!

更新.我的意思是输入 Qt AddIn

UPD. I meant that by type Qt AddIn

推荐答案

你应该给这个扩展一个机会:https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools

You should give a chance for this extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools

有了这个,您可以配置包含路径以获得更好的 IntelliSense 结果.

With this, you can configure include paths for better IntelliSense results.

配置包含路径

一种配置方式,例如 QtCore 模块.

One way to configure e.g the QtCore module.

  1. Ctrl + Shift + p 打开命令面板
  2. 搜索:C/Cpp:编辑配置
  3. 您应该有一个名为:c_cpp_properties.json
  4. 的新选项卡
  5. configurations 数组中,您应该编辑 Linux 部分
  6. includePath 设置中添加您的路径,例如:/usr/include/x86_64-linux-gnu/qt5/QtCore
  1. Ctrl + Shift + p to open command palette
  2. Search for: C/Cpp: Edit Configurations
  3. You should have a new tab called: c_cpp_properties.json
  4. In configurations array you should edit the Linux section
  5. Add your paths in the includePath setting e.g: /usr/include/x86_64-linux-gnu/qt5/QtCore

更多检查:https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Getting%20started.md

智能感知引擎

我们建议使用默认"引擎以获得最佳 IntelliSense 体验.但是,可以通过编辑您的用户或工作区设置来明确选择 IntelliSense 引擎.您应该修改的设置是 C_Cpp.intelliSenseEngine

We recommend using the "Default" engine for the best IntelliSense experience. However, it is possible to explicitly choose the IntelliSense engine by editing your user or workspace settings. The setting you should modify is C_Cpp.intelliSenseEngine

  • Default - Visual Studio 的 IntelliSense 引擎,这是提供语义感知 IntelliSense 功能的默认引擎
  • Tag Parser - 提供快速但模糊"结果的模糊"智能感知引擎,用于在默认引擎为时提供回退体验
  • Default - Visual Studio's IntelliSense engine, which is the default engine that provides semantic-aware IntelliSense features
  • Tag Parser - the "fuzzy" IntelliSense engine that provides quick but "fuzzy" results, is used to provide the fallback experience if the default engine is

关于它的更多细节:https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/IntelliSense%20engine.md

这篇关于如何在 Visual Studio Code 中使用 Qt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆