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:- Binary for Linux x86: for qtcreator 2.4.0
- Binary for Linux x86_64: for qtcreator 2.4.0
- Binary for Windows x86: for qtcreator 2.4.0
- Binary for Mac: for qtcreator 2.4.0
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/
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:
1 typedef bool ILoveToPolluteTheMainNamespace;
2 enum {
3 bob,
4 mark,
5 louis
6 };
7
8 class Hello
9 {
10 public:
11 Hello(Feeling &iloveyou, bool wontyou, QList<Sentences> tellme, Person *your, const QString &name);
12 bool initialize(const QStringList &arguments, QString *error_message);
13 bool needSomething(QList<Something> &things);
14 virtual void bye() = 0;
15 QMap<QString, QList> randomMethod() const;
16 //...
17 };
That would become:
1 /*!
2 \brief
3
4 */
5 typedef bool ILoveToPolluteTheMainNamespace;
6 /*!
7 \brief
8
9 */
10 enum {
11 bob,
12 mark,
13 louis
14 };
15
16 /*!
17 \brief
18
19 */
20 class Hello
21 {
22 public:
23 /*!
24 \brief
25
26 \param iloveyou
27 \param wontyou
28 \param tellme
29 \param your
30 \param name
31 */
32 Hello(Feeling &iloveyou, bool wontyou, QList<Sentences> tellme, Person *your, const QString &name);
33 /*!
34 \brief
35
36 \param arguments
37 \param error_message
38 \return bool
39 */
40 bool initialize(const QStringList &arguments, QString *error_message);
41 /*!
42 \brief
43
44 \param things
45 \return bool
46 */
47 bool needSomething(QList<Something> &things);
48 /*!
49 \brief
50
51 */
52 virtual void bye() = 0;
53 /*!
54 \brief
55
56 \return QMap<QString, QList>
57 */
58 QMap<QString, QList> randomMethod() const;
59 //...
60 };
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¶
- The Trolls indeed,
and therefore Nokia. - Nicolas Arnaud-Cormos got me started.
- VCreate Logic gave me some more info.