Inspired by my previous post on using Qt Creator on non-Qt SDK projects, I went a step further and integrated the Linux Man Pages section 2(system calls) and section 3(library functions) as a context help module in Qt Creator and Qt Assistant. Having documentation on all of the Linux system calls and system libraries at one click away(F1) is a great advantage and boost to productivity when doing system programming on Linux(and not only), especially now that Linux has around 400 system calls and GlibC 1400 functions.

 

The Man pages have been bundled as a Qt Compiled Help module that is easily plugged into Qt Creator or Qt Assistant. The HTML pages used are the official ones available at kernel.org, the online version. I have removed the Google search and StatCounter Code since they are not necessary for this purpose.

The manpages are accessible by context help, when pressing F1 on a declared function like select or printf or by visiting the Help screen and browsing them alphabetically or by searching the index. You can find more information about them right there in the Help screen in the Linux Man pages category.

You can download a gzipped version Qt Compiled Help Linux Manpages from here:

http://trunk.shinnok.com/qt/manpages.qch.gz

Using it is pretty straight straight forward, open up Qt Creator and go to Tools -> Options -> Help screen. Switch over to the Documentation tab and then click on Add, like so:

Browse to your gunzipped manpages.qch location and click Open. You should now see an entry named org.kernel.manpages.1.0 that points to your supplied location:

Remember that if you remove or move the .qch to another location Qt Creator will not be able to find it anymore, since it doesn’t create a copy for itself. It’s best if you put in a place that makes sense in this manner.

If i see demand for this module, I’ll move the instructions on how to import the Linux man pages Qt Compiled Help module, as well as download links, to the main site(shinnok.com) and I will try and update them every so often once I hear of important changes to the man pages. Till then, this will be a blog simple post.

Happy hacking!

Tagged with:
 

9 Responses to “Linux Man Pages integration with Qt Creator”

  1. Luc says:

    Hey,

    very cool! 😀 Not working completely yet in qtcreator 2.3 beta since the help seems somewhat unstable in qtcreator 2.3 😉 Could you post a howto so that we could maybe automatise the updates (crawl the kernel.org website every week or so) and maybe submit this somehow to the git repository of qtcreator?
    I would also be interested in (in somewhat the same way) parsing the stl documentation for the c++ code from, for example, cplusplus.com/reference or so.

    regards,
    luc

  2. michel says:

    Great work!

    thank you very much for that 😀

  3. Orgad says:

    I really missed that. Thanks a lot!

    I’d be glad if you publish a howto.

  4. mitch says:

    Hi,

    thaks a lot for this very very useful work!
    It should be include in the official distrib!!!!!

    well, I see that some pthread_ api functions are missing 🙁
    coul d you modify the qch?

    I don’t know how to do it, can you tell how to do?

    thanks again 😉

  5. ecloud says:

    In general, the installed man pages will be different on every system. So it would be nice to have a script to generate html and then qch from them directly, and run that in a periodic cron job. Then assistant could be used as man page reader for everything, not just for sections 2 and 3.

  6. Thanks. Interesting information

  7. sthalik says:

    Shows webkit error sadly:

    The page could not be found!

    Error loading: qthelp://org.kernel.manpages.1.0/doc/html/man3/memcpy.3.html

    If you can help get it to work, as well as show how to generate them on one’s own from newest GNU libc, I’d be much obliged!

  8. Thomas B. says:

    Could anyone make another updated zipped .qch version from the linux manpages, or tell me/point to how to do that my own?? I would update then the download link in the qt wiki pages.

Leave a Reply