QHelpSearchResult 類

QHelpSearchResult 類提供關聯搜索結果的數據。 更多...

頭: #include <QHelpSearchResult>
qmake: QT += help
Since: Qt 5.9

該類在 Qt 5.9 引入。

公共函數

QHelpSearchResult (const QUrl & url , const QString & title , const QString & snippet )
QHelpSearchResult (const QHelpSearchResult & other )
QHelpSearchResult ()
QHelpSearchResult & operator= (const QHelpSearchResult & other )
~QHelpSearchResult ()
QString snippet () const
QString title () const
QUrl url () const

詳細描述

The QHelpSearchResult object is a data object that describes a single search result. The vector of search result objects is returned by QHelpSearchEngine::searchResults (). The description of the search result contains the document title and URL that the search input matched. It also contains the snippet from the document content containing the best match of the search input.

另請參閱 QHelpSearchEngine .

成員函數文檔編製

QHelpSearchResult:: QHelpSearchResult (const QUrl & url , const QString & title , const QString & snippet )

Constructs the search result containing url , title and snippet as the description of the result.

QHelpSearchResult:: QHelpSearchResult (const QHelpSearchResult & other )

構造副本為 other .

QHelpSearchResult:: QHelpSearchResult ()

Constructs a new empty QHelpSearchResult.

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

賦值 other to this search result and returns a reference to this search result.

QHelpSearchResult:: ~QHelpSearchResult ()

Destroys the search result.

QString QHelpSearchResult:: snippet () const

Returns the document snippet containing the search phrase of the search result.

QString QHelpSearchResult:: title () const

Returns the document title of the search result.

QUrl QHelpSearchResult:: url () const

Returns the document URL of the search result.