PySide6.QtCore.QLibraryInfo¶
- class QLibraryInfo¶
QLibraryInfo
类提供了关于 Qt 库的信息。更多…概要¶
静态函数¶
def
build()
def
isDebugBuild()
def
isSharedBuild()
def
location()
def
path()
def
paths()
def
version()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
在配置和构建Qt时,会建立许多信息。该类提供了访问这些信息的抽象。通过使用该类的静态函数,应用程序可以获取有关其在运行时使用的Qt库实例的信息。
你也可以使用一个
qt.conf
文件来覆盖编译到Qt库中的硬编码路径。更多信息,请参阅使用qt.conf的文档。另请参阅
QSysInfo
conf
- class LibraryPath¶
此枚举类型用于查询特定路径:
常量
描述
QLibraryInfo.PrefixPath
所有路径的默认前缀。
QLibraryInfo.DocumentationPath
安装时文档的路径。
QLibraryInfo.HeadersPath
所有头文件的路径。
QLibraryInfo.LibrariesPath
已安装库的路径。
QLibraryInfo.LibraryExecutablesPath
运行时库所需的已安装可执行文件的路径。
QLibraryInfo.BinariesPath
已安装的Qt二进制文件(工具和应用程序)的路径。
QLibraryInfo.PluginsPath
已安装的Qt插件的路径。
QLibraryInfo.QmlImportsPath
安装的QML扩展的导入路径。
QLibraryInfo.Qml2ImportsPath
此值已弃用。请改用 QmlImportsPath。
QLibraryInfo.ArchDataPath
通用架构依赖的Qt数据的路径。
QLibraryInfo.DataPath
通用架构无关的Qt数据的路径。
QLibraryInfo.TranslationsPath
Qt字符串翻译信息的路径。
QLibraryInfo.ExamplesPath
安装时示例的路径。
QLibraryInfo.TestsPath
已安装的Qt测试用例的路径。
QLibraryInfo.SettingsPath
Qt设置的路径。在Windows上不适用。
另请参阅
- static build()¶
- Return type:
字符串
- static isDebugBuild()¶
- Return type:
布尔
如果此版本的 Qt 是在启用调试的情况下构建的,则返回
true
,如果是在发布模式下构建的,则返回 false。- Return type:
布尔
如果这是Qt的共享(动态)构建,则返回
true
。- static location(location)¶
- Parameters:
位置 –
LibraryPath
- Return type:
字符串
注意
此函数已弃用。
使用
path()
代替。返回由
loc
指定的路径。- static path(p)¶
- Parameters:
p –
LibraryPath
- Return type:
字符串
返回由
p
指定的路径。如果qt.conf中列出了多个路径,它将只返回第一个路径。
另请参阅
- static paths(p)¶
- Parameters:
p –
LibraryPath
- Return type:
字符串列表
返回由
p
指定的所有路径。另请参阅
- static platformPluginArguments(platformName)¶
- Parameters:
platformName – str
- Return type:
字符串列表
- static version()¶
- Return type:
返回Qt库的版本。
另请参阅
qVersion()