Welcome

You are welcome to contribute to the wiki if you register/use openid login.

Quick install with binaries

Visit the Files section and find the package that applies to you or if you are using Nokia Qt SDK, Nokia SDK or just a plain Qt Creator, here are binaries for you:

For Linux and Windows, extract in $path_to_qtcreator$/lib/qtcreator/plugins/ and you should be good to go.
For Mac OS X, extract in e.g. /Applications/Qt Creator.app/Contents/PlugIns/
Note that if Qt Creator is complaining at startup about wrong version numbers (patch number, not major or minor) for the plug-in dependencies, editing the Doxygen.pluginspec file and replacing the wrong version numbers should be enough to get it working.

Usage

  • Generate Doxygen tags: CTRL+SHIFT+F3 and the context menu -> "Create Doxygen Documentation"
  • Generate Doxygen tags for a whole file: CTRL+SHIFT+F5 and the context menu -> "Document whole file"
  • Building project documentation: CTRL+SHIFT+F4 and the "Tools/Doxygen" menu -> "Build Doxygen Documentation".
    If you didn't create and configure a Doxyfile at your project root, the default one will be generated and used.
  • Edit Doxyfile with doxywizard: CTRL+SHIFT+F6

Don't forget to configure the "doxygen" and "doxywizard" commands in "Settings/Documentation/Doxygen Plugin" if it is not in your $PATH.

Output example

Consider this meaningless snippet of code:

typedef bool ILoveToPolluteTheMainNamespace;
enum {
    bob,
    mark,
    louis
};

class Hello
{
public:
    Hello(Feeling &iloveyou, bool wontyou, QList<Sentences> tellme, Person *your, const QString &name);
    bool initialize(const QStringList &arguments, QString *error_message);
    bool needSomething(QList<Something> &things);
    virtual void bye() = 0;
    QMap<QString, QList> randomMethod() const;
    //...
};

That would become:

/*!
 \brief 

*/
typedef bool ILoveToPolluteTheMainNamespace;
/*!
 \brief 

*/
enum {
    bob,
    mark,
    louis
};

/*!
 \brief 

*/
class Hello
{
public:
    /*!
     \brief 

     \param iloveyou
     \param wontyou
     \param tellme
     \param your
     \param name
    */
    Hello(Feeling &iloveyou, bool wontyou, QList<Sentences> tellme, Person *your, const QString &name);
    /*!
     \brief 

     \param arguments
     \param error_message
     \return bool
    */
    bool initialize(const QStringList &arguments, QString *error_message);
    /*!
     \brief 

     \param things
     \return bool
    */
    bool needSomething(QList<Something> &things);
    /*!
     \brief 

    */
    virtual void bye() = 0;
    /*!
     \brief 

     \return QMap<QString, QList>
    */
    QMap<QString, QList> randomMethod() const;
    //...
};

For a more visual feel about the plugin's work, see Screenshots.

Compilation from sources

Get the source

You can get the source code either by using your favourite subversion client or by http.

svn download

The repository is world readable so it should be pretty straightforward, for downloading trunk from the command line:

user@host $ svn co http://svn.kofee.org/svn/qtcreator-doxygen/trunk qtcreator-doxygen

And to get a specific revision use the @rev_number syntax, e.g. for the source for qtcreator-2.0.1:

user@host $ svn co http://svn.kofee.org/svn/qtcreator-doxygen/trunk@32 qtcreator-doxygen

http download

If you want latest source: grab an archive of the trunk
If you want a specific revision, then either select it manually on websvn or append &rev=$rev_number to the download link, e.g. for the source for qtcreator-2.0.1:

http://svn.kofee.org/dl.php?repname=QtCreator-Doxygen&path=%2Ftrunk%2F&isdir=1&rev=32

Compile

Once in the source directory, you have two choices:

  • Edit the pro file to tweak it to your platform (paths, libs)
  • Pass arguments to qmake (revision r34 and up):
    QTC_SOURCE_DIR: The directory containing qtcreator source code
    QTC_BUILD_DIR: The directory where we build the plugin
    LIBSROOT: The root of the built qtcreator lib directory
    DEST: The directory where the shared library and the plugin spec files will be moved to

Example passing arguments to qmake:

user@host ~/qtcreator-doxygen $ qmake QTC_SOURCE_DIR=/home/kofee/Dev/Qt/qt-creator-2.1.0-src \
QTC_BUILD_DIR=/home/kofee/qtcdox_build \
LIBSROOT=/home/kofee/qtcreator-2.1.0/lib \
DEST=/home/kofee/qtcreator-2.1.0/lib/qtcreator/plugins/Kofee

You should see:

Project MESSAGE: QTC_SOURCE_DIR = /home/kofee/Dev/Qt/qt-creator-2.1.0-src
Project MESSAGE: IDE_SOURCE_TREE = /home/kofee/Dev/Qt/qt-creator-2.1.0-src
Project MESSAGE: QTC_BUILD_DIR = /home/kofee/qtcdox_build
Project MESSAGE: IDE_BUILD_TREE = /home/kofee/qtcdox_build
Project MESSAGE: DESTDIR = /home/kofee/qtcreator-2.1.0/lib/qtcreator/plugins/Kofee
Project MESSAGE: Good luck with make... :-D

And finally, do make:

user@host ~/qtcreator-doxygen $ make

If all goes well, it should be installed and (re)starting qtcreator will be enough to use the plugin.

Against Nokia binaries (Linux)

It almost compiles out of the box against the binaries distributed by Nokia, you just have to create few symbolic links for it to link properly. So short version in a bash shell:

user@host ~ $ cd qtcreator-2.1.0/lib/qtcreator
user@host ~/qtcreator-2.1.0/lib/qtcreator $ for i in *.so.1; do ln -s $i ${i/.so.1/.so}; done

And no more problem with finding -lAggregation and friends.

Against Nokia binaries (Mac OS X)

Compilation isn't the issue but telling the plugin to load Qt dylibs shipped with Qt Creator/the SDK can be (else, prepare to segfault):

long prompt stuff $ install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore /Applications/Qt\ Creator.app/Contents/PlugIns/Kofee/libDoxygen.dylib
long prompt stuff $ install_name_tool -change QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui /Applications/Qt\ Creator.app/Contents/PlugIns/Kofee/libDoxygen.dylib

Against a Gentoo install (qt-creator-2.1.0 here)

We already have the sources of qt-creator and the tools to manipulate them, so let's use it:

root@host ~/qtcreator-doxygen # ebuild /usr/portage/dev-util/qt-creator/qt-creator-2.1.0.ebuild unpack
root@host ~/qtcreator-doxygen # qmake QTC_SOURCE_DIR=/var/tmp/portage/dev-util/qt-creator-2.1.0/work/qt-creator-2.1.0-src/ LIBSROOT=/usr/lib/ DEST=/usr/lib/qtcreator/plugins/Kofee/
root@host ~/qtcreator-doxygen # make
root@host ~/qtcreator-doxygen # make clean
root@host ~/qtcreator-doxygen # ebuild /usr/portage/dev-util/qt-creator/qt-creator-2.1.0.ebuild clean

Restart qt-creator :)

Thanks