Important: Please read the Qt Code of Conduct -

Javascript in qch files for QtAssistent (generated by Doxygen) doesn't work

  • We're generating the documentation of our C++ sourcecode with Doxygen. The outputs are HTML files and a single QCH file, which can be loaded into QtAssistant.

    Everything used to work ok, but unfortunately, when using a fairly new version of Doxygen (we're using latest stable ver 1.8.6 right now), there are many interactive elements on the generated HTML documentation pages, i.e. to show inherited methods, signals, etc.

    The problem: In browsers, the interactive functions (such as menus / drop-down toggles) are perfectly working, in QtAssistant they are not. When looking into the HTML source code, one can see that the functionality is implemented via Javascript. So my question:

    1.) Does anybody know whether Javascript works inside QtAssistant, or how to turn it on?
    2.) Does anybody know how to turn off these dynamic features in Doxygen, in order to get a usable QCH version?
    3.) Any other suggesstions?

    Example: By random googling if found this example page:

    If you look at the "Public member functions inherited from" sections, you'll see the toggle button I mean, which doesn't work in QtAssistant. The source code for this says:
    @<td onclick="java_script:toggleInherit('pub_methods_classBaseOutputDocInterface')" colspan="2">@
    (I had to replace javascript with java_script for it to show up).

  • Update:

    2.) Apparently, setting HTML_DYNAMIC_SECTIONS = NO should turn off the interactive Javascript-toggles, but it does not. I also tried GENERATE_TREEVIEW = NO to avoid any dynamic content. But again, dynamic sections still there. :-(

    I also manually included two Javascript-files from Doxygen into the generated index.qhp-file (dynsections.js and jquery.js intp the files-sections), which were apparently missing before. I then used qhelpgenerator to create a new .QCH file (which was indeed slightly bigger). Unfortunatley, this didn't help.

    Oh and btw., I'm using Qt 4.8

    I also posted on the doxygen-developers mailinglist here:

    Still, any comments welcome!

  • Update: I think I could verify two bugs in Doxygen. I posted them here and here . In the latter link, I explained how to fix this problem manually... So it's not a problem of Qt Assistant per se.

Log in to reply