PDA

View Full Version : Help on QtHelp [Solved]



d_stranz
31st May 2013, 20:58
I got the bright idea that I should include some embedded help in my app, rather than force users to look it up in the PDF document.

I am trying to develop the UI for embedding QtHelp (using QHelpEngine and QTextBrowser). To do this I would like to simply use an existing help file (like assistant.qch or qmake.qch) to get the UI working before I start writing my own help.

Just can't get it to work. When I try to load the qch file (using QHelpEngineCore::registerDocumentation()) this fails because apparently the database is not open (QtHelp uses sqlite). So I am not sure if this is a deployment issue or a coding problem.

Can anyone point me to an app that uses the QtHelp module in this way? The Qt documentation says that this how it should be done, but I can't find an example. Google has not been my friend in this instance.

Note: I don't want an example that uses QtAssistant.

Thanks for any pointers.

**Edit: Never mind; after more Googling, I did find this discussion. (http://qt-project.org/forums/viewthread/3965) My problem was apparently the missing qhc (help collection) file. The documentation for QHelpEngine::QHelpEngine() incorrectly states:


Constructs a new help engine with the given parent. The help engine uses the information stored in the collectionFile for providing help. If the collection file does not already exist, it will be created.

This is not true. The collection file *must* exist, it *is not* created if it does not.