View Full Version : Easier access to Qt Documentation

14th May 2007, 20:07
Here is the itch I had to scratch: When coding in Qt, it takes a lot of scrolling and time to find the right classes on the All Classes page. There is of course the Main Classes page, but you might not agree with the Trolls on which classes are the "main" ones.

With this short program it is easy to make a small & relevant page:

The program takes one argument, the name of a directory where you keep source code for some big project.
In that directory, all files with extention .cc .h and .cpp will be scanned for Qt classes.
On stdout, the program will print a html page formatted just like Main Classes but with your classes instead.
So direct the output to a file, say myclasses.html, in <Qt-installation-dir>/doc/html.
edit <Qt-installation-dir>/doc/html/index.html Right after the first "middot", insert something like:

<a href="myclasses.html"><font color="#004faf">Foobar's&nbsp;Classes</font></a>&nbsp;&middot;
Then, you can browse the docs with Qt Assistant or a web browser, as usual.

(Tested on Linux)

14th May 2007, 20:40
Just wondering... Have you tried :

The index search (http://doc.trolltech.com/4.2/assistant-manual.html#qt-assistant-in-more-detail) of Qt Assistant
The search (http://doc.trolltech.com/4.2/assistant-manual.html#full-text-searching) of Qt Assistant
The bookmarks (http://doc.trolltech.com/4.2/assistant-manual.html#the-bookmarks-menu) features in Qt Assistant
Maybe you did not need to write a program for this... Interesting proof of concept anyway. You may want to extend it by adding an Assistant file that would generate an entry in the index pointing to your custom documentation : http://doc.trolltech.com/4.2/assistant-manual.html#modifying-the-default-documentation-set

15th May 2007, 20:41
No, I haven't tried those... I normally browse the documentation using a few tabs in Firefox as I always have a web browser running anyway and so can avoid cluttering the desktop with another app.
I like Qt Assistant's font size-buttons though, and clutter is less of a problem when using virtual desktops properly.