Solved QTabWidget does not accept QHelpEngine's central widget
-
Hi I'm following this link to embed help file into my app. The QTabWidget::addTab does not accept the QHelpContentWidget * helpEngine->contentWidget() and QHelpIndexWidget *.
QTabWidget* tWidget = new QTabWidget; tWidget->setMaximumWidth(200); tWidget->addTab(helpEngine->contentWidget(), "Contents"); tWidget->addTab(helpEngine->indexWidget(), "Index");
error: no matching function for call to ‘QTabWidget::addTab(QHelpIndexWidget*, const char [6])’ tabWidget->addTab(helpEngine->indexWidget(), "Index"); ^
-
Hi,
Are you missing the include for
QHelpContentWidget
? -
@SGaist said in QTabWidget does not accept QHelpEngine's central widget:
Hi,
Are you missing the include for
QHelpContentWidget
?@SGaist Thanks. And I was being fool to forget this. A little surprised though that the
<QHelpEngine>
does not include<QHelpContentWidget>
and<QHelpIndexWidget>
. -
@dalishi said in QTabWidget does not accept QHelpEngine's central widget:
A little surprised though that the <QHelpEngine> does not include <QHelpContentWidget> and <QHelpIndexWidget>.
There's no reason for that, the engine can be used without these two widget classes.
-
@SGaist said in QTabWidget does not accept QHelpEngine's central widget:
@dalishi said in QTabWidget does not accept QHelpEngine's central widget:
A little surprised though that the <QHelpEngine> does not include <QHelpContentWidget> and <QHelpIndexWidget>.
There's no reason for that, the engine can be used without these two widget classes.
Hi @SGaist Thanks for the reply. Now I get the QHelpEngine worked in my application with a .qch and .qhc.
However, when I try to statically link my application to Qt (which i build myself), using~/qt5-static-build/qtbase/bin/qmake -config release ..
there's an error:
Project ERROR: Unknown module(s) in QT: help
I found the libQt5Help.a is under /qttools/lib/ while other main modules like libQt5Gui are in /qtbase/lib/.
Do I need to specially indicate where to find the library? I have Qt += help in my .pro file. -
Looks like it didn't get installed. You can call make install in the module build folder and see if it fixes that.
-
@SGaist said in QTabWidget does not accept QHelpEngine's central widget:
Looks like it didn't get installed. You can call make install in the module build folder and see if it fixes that.
Hi @SGaist Thanks. This topic is resolved.
-
Great !
Then please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)