PDA

View Full Version : How do I incorporate standalone content into a QCH file?



evilbunny
17th December 2010, 23:56
I see that the Qt Reference Documentation (the qt.qch file) that appears in Qt Creator 2.0.0 contains API reference documentation topics (class descriptions, etc.) as well as conceptual topics (overview of using models and views, etc.). I would like to know if I can create a similar .qch file--one with a mix of API ref topics and conceptual topics. Thought I might be able to point qhelpgenerator.exe to a folder that contains my .html files (API reference files and concept files) and to my .qhp file that references the files, but it doesn't seem to work. The concept file shows up in the TOC, but I get "page could not be found 'qthelp://<namespace>/<index.html#//<filename>' error.

Note: we want the doc to display in Creator, not Assistant.

wysota
18th December 2010, 08:49
You can do that but for it to work you need to properly populate the help generator project file. Take a look at existing files and follow the pattern. Pay attention to the namespace (or rather "virtual folder") part, it can't be some arbitrary path.

evilbunny
21st December 2010, 17:59
Many thanks for the quick response, Wysota. I tried every combination of entries I could think of in the virtualFolder tag and namespace tag, both in the .qhp as well as all involved .html files. Even tried deleting one tag, then the other, etc., but I still get the same error on the TOC entries and search result entries for the .html files not created through code extraction (the concept topics). The .html files created through extraction work every time.

I couldn’t find a sample that separates the extraction step from the .qch file creation step (ie, has “outside” .html files to deal with). Do you know of any or have a sample? Or is there a better way to bring these “outside” files in? It’s almost as if index.html is getting inserted into the path for some reason (going by the error message). Should’ve mentioned none of the .html files I want to add are named index.html. Or perhaps there are key places I need to match up virtual folder and/or namespace—do you know what those are?

evilbunny
29th December 2010, 17:14
Wysota--I figured it out. It was a script in the files that Qt Creator didn't like. It's working now. Many thanks again for your help (without your note telling me it should work, I wouldn't have kept trying things.)