Auf dieser Seite

QHelpContentModel Class

Die Klasse „QHelpContentModel“ stellt ein Modell bereit, das Inhalte an Ansichten liefert. Mehr...

Überschrift: #include <QHelpContentModel>
CMake: find_package(Qt6 REQUIRED COMPONENTS Help)
target_link_libraries(mytarget PRIVATE Qt6::Help)
qmake: QT += help
Erbt von: QAbstractItemModel

Öffentliche Funktionen

virtual ~QHelpContentModel() override
QHelpContentItem *contentItemAt(const QModelIndex &index) const
void createContents(const QString &filter)
(since 6.8) void createContentsForCurrentFilter()
bool isCreatingContents() const

Neu implementierte öffentliche Funktionen

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

Signale

Ausführliche Beschreibung

Dokumentation der Mitgliedsfunktionen

[override virtual noexcept] QHelpContentModel::~QHelpContentModel()

Löscht das Hilfe-Inhaltsmodell.

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

Umsetzt: ` QAbstractItemModel::columnCount(const QModelIndex &parent) const`.

Gibt die Anzahl der Spalten unter dem angegebenen ` parent` zurück. Gibt derzeit immer 1 zurück.

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

Gibt den Hilfeinhaltsposten an der Modellindexposition „ index “ zurück.

[signal] void QHelpContentModel::contentsCreated()

Dieses Signal wird ausgesendet, wenn der Inhalt erstellt wurde.

[signal] void QHelpContentModel::contentsCreationStarted()

Dieses Signal wird ausgegeben, wenn die Erstellung des Inhalts begonnen hat. Der aktuelle Inhalt ist ab diesem Zeitpunkt ungültig, bis das Signal „ contentsCreated()“ ausgegeben wird.

Siehe auch ` isCreatingContents()`.

void QHelpContentModel::createContents(const QString &filter)

Erstellt neue Inhalte, indem das Hilfesystem nach Inhalten abgefragt wird, die für den Namen des benutzerdefinierten „ filter “ angegeben sind.

[since 6.8] void QHelpContentModel::createContentsForCurrentFilter()

Erstellt neue Inhalte, indem das Hilfesystem nach Inhalten abgefragt wird, die für den aktuellen Filter festgelegt sind.

Diese Funktion wurde in Qt 6.8 eingeführt.

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

Umsetzung von: ` QAbstractItemModel::data(const QModelIndex &index, int role) const`.

Gibt die unter dem angegebenen ` role ` gespeicherten Daten für das Element zurück, auf das ` index` verweist.

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

Umsetzung von: ` QAbstractItemModel::index(int row, int column, const QModelIndex &parent) const`.

Gibt den Index des Elements im Modell zurück, das durch die angegebenen Indizes ` row`, ` column ` und ` parent ` spezifiziert wird.

bool QHelpContentModel::isCreatingContents() const

Gibt „true“ zurück, wenn der Inhalt gerade neu generiert wird, andernfalls „false“.

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

Implementiert: ` QAbstractItemModel::parent(const QModelIndex &index) const`.

Gibt das übergeordnete Element des Modellelements mit dem angegebenen ` index` zurück oder `QModelIndex()`, falls es kein übergeordnetes Element hat.

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

Umsetzt: ` QAbstractItemModel::rowCount(const QModelIndex &parent) const`.

Gibt die Anzahl der Zeilen unter dem angegebenen ` parent` zurück.

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