views:

1661

answers:

4

How do I produce Qt-style documentation (Trolltech's C++ Qt or Riverbank's PyQt docs) with Doxygen? I am documenting Python, and I would like to be able to improve the default function brief that it produces.

In particular, I would like to be able to see the return type (which can be user specified) and the parameters in the function brief.

For example:

 Functions:

     int getNumber(self)
     str getString(self)
     tuple getTuple(self, int numberOfElements=2)

 Function Documentation:

     int getNumber(self)

           gets the number of items within a list as specified...

           Definition at line 63 of ....

     etc...

If this isn't possible without modifying the source, maybe there is another tool other than Doxygen that handles Python documentation in this kind of way?

+1  A: 

If you're doing anything documentation related when it comes to Python I recommend Sphinx. It's what the developers of python use for their documentation.

SAHChandler
Agreed. It is nice, but python is not the only language we're using and we'd like to strive for consistency across our documentation.
Dan
A: 

This page seem to detail the method of creating a qt-style docs.
basically there's a tool you get with qt called qhelpgenerator which creates a .qch file, edible by the qt assistant.
I haven't used it before but it looks fairly simple.

shoosh
+2  A: 

Then just use Doxygen? This will get you started:

This is a guide for automatically generating documentation off of Python source code using Doxygen.

Obviously, since Python is not strongly typed, specifying the return type and the expected type of the parameters will be up to you, the documentation writer. That's just best practices anyway.

Shane C. Mason
A: 

You do not have to put doxygen comments in the code. You can put the documentation in other places. Check out this page in the doxygen manual.

Dusty Campbell