QHelpContentModel 类

QHelpContentModel 类提供向视图供给内容的模型。 更多...

头: #include <QHelpContentModel>
CMake: find_package(Qt6 REQUIRED COMPONENTS Help)
target_link_libraries(mytarget PRIVATE Qt6::Help)
qmake: QT += help
继承: QAbstractItemModel

公共函数

virtual ~QHelpContentModel () override
QHelpContentItem * contentItemAt (const QModelIndex & index ) const
void createContents (const QString & customFilterName )
bool isCreatingContents () const

重实现公共函数

virtual int columnCount (const QModelIndex & parent = QModelIndex()) const override
virtual QVariant data (const QModelIndex & index , int role ) const override
virtual QModelIndex index (int row , int column , const QModelIndex & parent = QModelIndex()) const override
virtual QModelIndex parent (const QModelIndex & index ) const override
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const override

信号

void contentsCreated ()
void contentsCreationStarted ()

详细描述

成员函数文档编制

[override virtual] QHelpContentModel:: ~QHelpContentModel ()

Destroys the help content model.

[override virtual] int QHelpContentModel:: columnCount (const QModelIndex & parent = QModelIndex()) const

重实现: QAbstractItemModel::columnCount(const QModelIndex &parent) const .

Returns the number of columns under the given parent . Currently returns always 1.

QHelpContentItem *QHelpContentModel:: contentItemAt (const QModelIndex & index ) const

Returns the help content item at the model index position index .

[signal] void QHelpContentModel:: contentsCreated ()

This signal is emitted when the contents have been created.

[signal] void QHelpContentModel:: contentsCreationStarted ()

This signal is emitted when the creation of the contents has started. The current contents are invalid from this point on until the signal contentsCreated () 被发射。

另请参阅 isCreatingContents ().

void QHelpContentModel:: createContents (const QString & customFilterName )

Creates new contents by querying the help system for contents specified for the customFilterName .

[override virtual] QVariant QHelpContentModel:: data (const QModelIndex & index , int role ) const

重实现: QAbstractItemModel::data(const QModelIndex &index, int role) const .

Returns the data stored under the given role for the item referred to by the index .

[override virtual] QModelIndex QHelpContentModel:: index ( int row , int column , const QModelIndex & parent = QModelIndex()) const

重实现: QAbstractItemModel::index(int row, int column, const QModelIndex &parent) const .

返回模型中的项索引,指定通过给定 row , column and parent 索引。

bool QHelpContentModel:: isCreatingContents () const

Returns true if the contents are currently rebuilt, otherwise false.

[override virtual] QModelIndex QHelpContentModel:: parent (const QModelIndex & index ) const

重实现: QAbstractItemModel::parent(const QModelIndex &index) const .

Returns the parent of the model item with the given index , or QModelIndex() if it has no parent.

[override virtual] int QHelpContentModel:: rowCount (const QModelIndex & parent = QModelIndex()) const

重实现: QAbstractItemModel::rowCount(const QModelIndex &parent) const .

Returns the number of rows under the given parent .