本页内容

QHelpIndexWidget Class

QHelpIndexWidget 类提供了一个列表视图,用于显示QHelpIndexModel 。更多内容...

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

公共槽

void activateCurrentItem()
void filterIndices(const QString &filter, const QString &wildcard = {})

信号

void documentActivated(const QHelpLink &document, const QString &keyword)
void documentsActivated(const QList<QHelpLink> &documents, const QString &keyword)

详细说明

成员函数文档

[slot] void QHelpIndexWidget::activateCurrentItem()

激活当前项目,这最终将触发 linkActivated() 或 linksActivated() 信号。

[signal] void QHelpIndexWidget::documentActivated(const QHelpLink &document, const QString &keyword)

当某个项目被激活且其关联的document 应被显示时,会发出此信号。为了确定该链接所属的位置,会将keyword 作为第二个参数传入。

[signal] void QHelpIndexWidget::documentsActivated(const QList<QHelpLink> &documents, const QString &keyword)

当表示“keyword ”的项被激活,且该项关联了多个文档时,会发出此信号。documents 包含文档标题及其URL。

[slot] void QHelpIndexWidget::filterIndices(const QString &filter, const QString &wildcard = {})

根据filter 或wildcard 过滤索引。匹配度最高的条目将被设为当前条目。

另请参阅 QHelpIndexModel::filter()。

© 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.