QHelpContentModel Class | Qt Help 5.4

- Qt 5.4
- Qt Help
- C++ Classes
- QHelpContentModel
- Qt 5.4.2 Reference Documentation

# QHelpContentModel Class

The QHelpContentModel class provides a model that supplies content to views. More...

Header: | #include <QHelpContentModel>
qmake: | QT += help
Since: | Qt 4.4
Inherits: |

- List of all members, including inherited members

## Public Functions

| ~QHelpContentModel()
int | columnCount(const QModelIndex & parent = QModelIndex()) const
QHelpContentItem * | contentItemAt(const QModelIndex & index) const
void | createContents(const QString & customFilterName)
QVariant | data(const QModelIndex & index, int role) const
QModelIndex | index(int row, int column, const QModelIndex & parent = QModelIndex()) const
bool | isCreatingContents() const
QModelIndex | parent(const QModelIndex & index) const
int | rowCount(const QModelIndex & parent = QModelIndex()) const

## Signals

void | contentsCreated()
void | contentsCreationStarted()

## Detailed Description

The QHelpContentModel class provides a model that supplies content to views.

## Member Function Documentation

### QHelpContentModel::~QHelpContentModel()

Destroys the help content model.

### int QHelpContentModel::columnCount(const QModelIndex & parent = QModelIndex()) 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() is emitted.

See also isCreatingContents().

### void QHelpContentModel::createContents(const QString & customFilterName)

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

### QVariant QHelpContentModel::data(const QModelIndex & index, int role) const

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

### QModelIndex QHelpContentModel::index(int row, int column, const QModelIndex & parent = QModelIndex()) const

Returns the index of the item in the model specified by the given row, column and parent index.

### bool QHelpContentModel::isCreatingContents() const

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

### QModelIndex QHelpContentModel::parent(const QModelIndex & index) const

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

### int QHelpContentModel::rowCount(const QModelIndex & parent = QModelIndex()) const

Returns the number of rows under the given parent.