Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Different Comment Styles [solved]
Forum Updated to NodeBB v4.3 + New Features

Different Comment Styles [solved]

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 5.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.
  • N Offline
    N Offline
    Nobody-86
    wrote on last edited by
    #1

    Hi,

    I started to document my code using Doxygen. Doxygens manual says there are two different ways to mark a commentblock to be documentated. One started with //* (JavaDoc style), the other with //! (Qt style).
    If I type //* above my setReal-Method of my CplxNum-Class in Qt-Creator it will be auto-completed to

    @
    /**

    • @brief CplxNum::setReal
    • @param real
      */
      @

    and //! is autocompleted to

    @
    /*!

    • \brief CplxNum::setReal
    • \param real
      */
      @

    I noticed that there is a minor different in these completions (@param -> \param, @brief -> \brief). I guess that this is a Qt specific thing, because it doesn't know that I want to use Doxygen for documentation.

    What is the difference between these two comment styles and which one is recommended?

    Thanks,
    Nobody-86

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      The differences are purely cosmetic. Doxygen accepts both JavaDoc-style and Qt-style comments, so you can choose whichever you want.

      In fact, Doxygen began as a tool to generate documentation for Qt code: http://www.stack.nl/~dimitri/doxygen/manual/features.html

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Nobody-86
        wrote on last edited by
        #3

        Hi JKSH,

        thanks for your reply. Good to know that there is no difference between these styles.

        -> solved

        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