Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
doc_src_qthelp.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4//! [6]
5QHelpEngineCore helpEngine("mycollection.qhc");
6...
7
8// get all file references for the identifier
9QList<QHelpLink> links =
10 helpEngine.documentsForIdentifier(QLatin1String("MyDialog::ChangeButton"));
11
12// If help is available for this keyword, get the help data
13// of the first file reference.
14if (links.count()) {
15 QByteArray helpData = helpEngine->fileData(links.constBegin()->url);
16 // show the documentation to the user
17 if (!helpData.isEmpty())
18 displayHelp(helpData);
19}
20//! [6]
QHelpEngineCore helpEngine("mycollection.qhc")
[6]