本页内容

QCompressedHelpInfo Class

QCompressedHelpInfo 类可用于访问压缩帮助文件的详细信息。更多内容...

头文件: #include <QCompressedHelpInfo>
CMake: find_package(Qt6 REQUIRED COMPONENTS Help)
target_link_libraries(mytarget PRIVATE Qt6::Help)
qmake: QT += help

公共函数

QCompressedHelpInfo()
QCompressedHelpInfo(const QCompressedHelpInfo &other)
QCompressedHelpInfo(QCompressedHelpInfo &&other)
~QCompressedHelpInfo()
QString component() const
bool isNull() const
QString namespaceName() const
void swap(QCompressedHelpInfo &other)
QVersionNumber version() const
QCompressedHelpInfo &operator=(QCompressedHelpInfo &&other)
QCompressedHelpInfo &operator=(const QCompressedHelpInfo &other)

静态公共成员

QCompressedHelpInfo fromCompressedHelpFile(const QString &documentationFileName)

详细说明

通过调用fromCompressedHelpFile()静态方法并提供压缩帮助文件的路径,可以获取该压缩帮助文件的详细信息。

该类提供对压缩帮助文件的各种信息的访问。与给定的压缩帮助文件关联的命名空间是namespaceName(),关联的组件名称是component(),而version() 提供版本信息。

另请参阅 QHelpFilterEngine 。

成员函数文档

QCompressedHelpInfo::QCompressedHelpInfo()

构建关于压缩帮助文件的空信息。

QCompressedHelpInfo::QCompressedHelpInfo(const QCompressedHelpInfo &other)

创建other 的副本。

QCompressedHelpInfo::QCompressedHelpInfo(QCompressedHelpInfo &&other)

该函数通过“move”构造方式创建一个 QCompressedHelpInfo 实例,使其指向与other 所指向的同一对象,从而使其包含other 原先所包含的信息。

[noexcept] QCompressedHelpInfo::~QCompressedHelpInfo()

销毁QCompressedHelpInfo 。

QString QCompressedHelpInfo::component() const

返回压缩帮助文件的组件。

[static] QCompressedHelpInfo QCompressedHelpInfo::fromCompressedHelpFile(const QString &documentationFileName)

返回现有 qch 文件中documentationFileName 的QCompressedHelpInfo 实例。

bool QCompressedHelpInfo::isNull() const

如果信息无效,则返回true ;否则返回false 。

QString QCompressedHelpInfo::namespaceName() const

返回压缩帮助文件的命名空间名称。

[noexcept] void QCompressedHelpInfo::swap(QCompressedHelpInfo &other)

将压缩的帮助文件other 与该压缩帮助文件互换。此操作速度极快,且绝不会失败。

QVersionNumber QCompressedHelpInfo::version() const

返回压缩帮助文件的版本号。

QCompressedHelpInfo &QCompressedHelpInfo::operator=(QCompressedHelpInfo &&other)

将other 通过Move操作赋值给此QCompressedHelpInfo 实例。

QCompressedHelpInfo &QCompressedHelpInfo::operator=(const QCompressedHelpInfo &other)

将此 QHelpCollectionDetails 转换为other 的副本,从而使两者完全相同,并返回对此 QHelpCollectionDetails 的引用。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.