Qt World Summit: Submit your Presentation

Is it possible to create documentation for QML?

  • Hello,

    as i am aware of there is no tool similar to doxygen which can create documentation for QML.

    Is this still valid or there is some progress in that?

    thanks in advance

  • Using qdoc then it is possible to create documentation for Qt 4.7.4 and above (it works for Qt 4.7.3 as well, but that uses a version of qdoc that is a bit outdated). Currently we only have little documentation on the commands to use and how to use them though. This documentation will be improved at a later time.

    For now, the online "qdoc manual":http://doc.qt.nokia.com/qdoc/13-qdoc-commands-topics.html includes the very basic information about QML related commands. More documentation on this will be included later. In addition you can go into the "Qt Quick Components project":https://qt.gitorious.org/qt-components/ because it has valid QML documentation, so looking at that shows how it can be done.

    Also, note that there will be a qml parser in qdoc3 in Qt 5. It is work in progress, but it is coming.

  • Some time ago (when there was the version 4.7.2) I asked for this too, before deciding to use qdoc and/or doxygen. Andre explained me that qdoc was mostly for internal usage and frequently changing so it was not a so reliable method to produce documentation. Are now the things changed? I have the same problem: doxygen can't manage QML in a decent way.

    Thank you

  • It is true that we don't support qdoc for external usage, however we use it internally for both QML and Qt documentation. Currently it is the only tool available for creating QML documentation and looking at the manual and the source code should help you to get correct usage of qdoc for QML documentation, even though it is not supported externally. Again looking at the the Qt Quick Components project as mentioned in my first reply shows how it can be done.

    Regarding qdoc frequently changing then there are essentially 3 different levels: qt 4.7.3, qt4.7.4+, and qt 5. Qt 4.8 should have the Qt 4.7.4 support. 4.7.3 qdoc3 has the bare minimum to generate an html while 4.7.4+ has linking and more component support.

  • Hmmm. Thank you sigrid, good clarification.

    When I checked it it was at the first of the three levels you mention. The fact is taht I have already stylesheets and other stuff ready to go for C++ and java with doxygen. I had read at this time the qdoc online documentation seeing that to create documentation there was a lot of hand-made jobs. So I suspended this question. Now that QML is really a meaningful part of my projects and integrates with C++ in a lot of way I think I can be the time to keed the hands again on qdoc.

  • [quote author="Alicemirror" date="1316071074"] doxygen can't manage QML in a decent way.

    Can doxygen create documentation for qml?

    [quote author="sigrid" date="1315917451"]
    Also, note that there will be a qml parser in qdoc3 in Qt 5. It is work in progress, but it is coming.[/quote]

    What do you mean?Will this parser create automatically documentation for QML if the right comments exist?
    Can you provide me please a link to it?

    Also in order qdoc3 to work does it require the project to use qmake?


Log in to reply