当前位置:网站首页>获取Qt的安装信息:包括安装目录及各种宏地址
获取Qt的安装信息:包括安装目录及各种宏地址
2022-08-11 03:47:00 【欧特克_Glodon】
可以通过qmake或QLibraryInfo类获取Qt的安装信息。
一、使用QMake
执行cmd 进入控制台页面,然后执行命令:
qmake -query
效果 如下:
二、使用QLibraryInfo
可以在程序中使用QLibraryInfo类的location函数获取到Qt的安装信息。
QString QLibraryInfo::location(QLibraryInfo::LibraryLocation loc);
可使用的枚举参数:
enum LibraryLocation
{
PrefixPath = 0,
DocumentationPath,
HeadersPath,
LibrariesPath,
LibraryExecutablesPath,
BinariesPath,
PluginsPath,
ImportsPath,
Qml2ImportsPath,
ArchDataPath,
DataPath,
TranslationsPath,
ExamplesPath,
TestsPath,
#ifdef QT_BUILD_QMAKE
SysrootPath,
SysrootifyPrefixPath,
HostBinariesPath,
HostLibrariesPath,
HostDataPath,
TargetSpecPath,
HostSpecPath,
HostPrefixPath,
LastHostPath = HostPrefixPath,
#endif
SettingsPath = 100
};
边栏推荐
猜你喜欢
"Life Is Like First Seen" is ill-fated, full of characters, and the contrast of Zhu Yawen's characters is too surprising
Environment configuration of ESP32 (arduino arduino2.0 VScode platform which is easy to use?)
【FPGA】day22-SPI protocol loopback
leetCode刷题14天二叉树系列之《 110 平衡二叉树判断》
Interchangeable Measurement Techniques - Geometric Errors
互换性测量技术-几何误差
常用认证机制
LeetCode刷题第16天之《239滑动窗口最大值》
C语言之自定义类型------结构体
Graphical LeetCode - 640. Solving Equations (Difficulty: Moderate)
随机推荐
【FPGA】day22-SPI协议回环
LeetCode热题(12.买卖股票的最佳时机)
LeetCode刷题第16天之《239滑动窗口最大值》
学编程的第十三天
按摩椅控制板的开发让按摩椅变得简约智能
KingbaseES有什么办法,默认不读取sys_catalog下的系统视图?
移动端地图开发选择哪家?
浮点数在内存中的存储方式
元素的BFC属性
Leetcode 450. 删除二叉搜索树中的节点
What should I do if the channel ServerID is incorrect when EasyCVR is connected to a Hikvision Dahua device and selects another cluster server?
一次简单的 JVM 调优,学会拿去写到简历里
Audio codec, using FAAC to implement AAC encoding
“顶梁柱”滑坡、新增长极难担重任,阿里“蹲下”是为了跳更高?
互换性与测量技术——表面粗糙度选取和标注方法
构建程序化交易系统需要注意什么问题?
没想到MySQL还会问这些...
Homework 8.10 TFTP protocol download function
[yu gong series] Go program 035-08 2022 interfaces and inheritance and transformation and empty interface
Roewe imax8ev cube battery security, what blackening and swelling are hidden behind it?