Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QDoc in QML files issues

QDoc in QML files issues

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 1 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    feldifux
    wrote on last edited by
    #1

    Hi,
    after working a while with qdoc-comments inside qml files, I had a couple of issues...

    First, documentation for functions is not generated. So if you have the following qml code:
    @
    /*!
    This documentation should be exported.
    */
    function myFunc() {
    }
    @

    ... then no documentation is exported (I use HTML for output).

    Similar to this missing support of function documentation, also signal documentation infos are not exported.

    In addition, also the \internal command of qdoc is ignored. So if any property should not be exported (by using the \internal command) it is still visible in the exported HTML file! Here is an example:
    @
    /*!
    \internal
    This property documentation should not be exported, but it is!
    */
    property int testProp
    @

    I did try these scenarios with qdoc3 from Qt version 4.8.1, 4.8.2 and also Qt5 (the current master). With Qt5 even normal property documentations do not get exported, so it is the least working version.

    The exporting works fine, if I write the documentation in a separate .qdoc file. However, I do not like the approach of separated doc/source code as you will always miss something when they are not in the same place (so not in one qml file), and they get easily out of sync. In the QtQuickComponents for Symbian & Meego project the doc is written in separate files, but I guess generating docs from qml files is supposed to work, because it even is documented in the qdoc3 manual: http://doc-snapshot.qt-project.org/qdoc/componentset.html

    I hope anybody has experience with this issue and could help me out.

    cheers,
    Chris

    Founder of Felgo SDK - http://felgo.com/qt

    Felgo simplifies

    • Mobile App Dev with Qt esp. iOS & Android
    • Game Development with Qt

    What others say

    Felgo scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

    1 Reply Last reply
    0
    • F Offline
      F Offline
      feldifux
      wrote on last edited by
      #2

      Hi again,
      I figured it out - with Qt5's qdoc my mentioned issues were fixed (I had an old version of qt5 still using qdoc3).

      So now everything works as expected and documented in the manuals, and docs can be exported without extra topic commands like \qmlmethod or \internal.

      I can now highly recommend qdoc! We use qdoc for the documentation of our Qt-based 2D game engine for QML and C++ code, which works pretty well because you can export the docs for the integrated help in QtCreator AND to web templates (see here how ours looks like: http://doc.v-play.net/beta/).

      Founder of Felgo SDK - http://felgo.com/qt

      Felgo simplifies

      • Mobile App Dev with Qt esp. iOS & Android
      • Game Development with Qt

      What others say

      Felgo scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved