14 #include <QApplication>
17 #include <QHelpContentWidget>
18 #include <QHelpIndexWidget>
20 #include <QVBoxLayout>
29 QSplitter *horizSplitter =
new QSplitter(Qt::Horizontal,
myDisplay);
30 layout->addWidget(horizSplitter);
32 QTabWidget* tWidget =
new QTabWidget(horizSplitter);
33 tWidget->addTab(contentWidget(), tr(
"Contents"));
34 tWidget->addTab(indexWidget(), tr(
"Index"));
37 connect(contentWidget(), SIGNAL(linkActivated(QUrl)),
myBrowser, SLOT(setSource(QUrl)));
38 connect(indexWidget(), SIGNAL(linkActivated(QUrl, QString)),
myBrowser, SLOT(setSource(QUrl)));
40 horizSplitter->insertWidget(0, tWidget);
41 horizSplitter->insertWidget(1,
myBrowser);
68 if (!helpId.isNull()) {
69 auto links = linksForIdentifier(helpId.toString());
71 return links.begin().value();
78 auto widget = QApplication::focusWidget();
83 return QUrl(
"qthelp://com.real-time.crossfire/cre/index.html");