vs code导航到Qt 源码

vs code导航到Qt 源码

在项目中经常会需要看看Qt的源码,所以需要定位到Qt source code中。

其实很简单只需要配置下就可以了。

1、按住shift+ctrl+p 就会弹出如下的输入框,再输入edit 找到红色框中内容

vs code导航到Qt 源码_第1张图片

2、打开之后就会看到如下内容。

在includePath这个里面输入你的qt源码目录就可以了,比如我的"D:/qt/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/**", ** 表示包含子目录内容

vs code导航到Qt 源码_第2张图片

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "D:/qt/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/**"

            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.19041.0",
            "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}

这样就可以了

你可能感兴趣的:(vs,code,tricks,qt,开发语言,windows)