Results 1 to 4 of 4

Thread: //! [0] marks

  1. #1
    Join Date
    Sep 2009
    Posts
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default //! [0] marks

    Maybe its a stupid question, but what are these marks in demo programs?

    //! [0]
    //! [1]
    ...

    I cant search anywhere because search engines doesn't allow these characters.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: //! [0] marks

    They are marks for qdoc3 application to identify code snippets that are later embedded into documentation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: //! [0] marks

    The comments are used by Qt Software's tool for extracting code documentations. Just like Doxygen does (or do the trolls even use Doxygen?).
    Normally the doxygen comments work only outside any function/method. Doxygen comments inside a function are ignored by the tool.

    These special comments work inside functions.
    They can divide code into paragraphs that can be displayed independently inside the documentation.

    Example:
    If you have a look athe QSahredMemory example (http://qt.nokia.com/doc/4.5/ipc-sharedmemory.html) you see that the method code of void Dialog::loadFromFile() is divided in to two parts (about in middle of the whole page).
    When you now have a look at the source code examples\ipc\sharedmemory\dialog.cpp you see these special comments at exactly the place where the documentation shows the code paragraphs.

  4. #4
    Join Date
    Sep 2009
    Posts
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: //! [0] marks

    Thanks for the quick reply!. I thought maybe it was some navigation or debbuging thing i could use in my own programs.

Similar Threads

  1. qslider fixed to tick marks
    By holst in forum Qt Programming
    Replies: 4
    Last Post: 24th July 2009, 12:18
  2. QSlider with tick marks numbers
    By mastupristi in forum Qt Programming
    Replies: 3
    Last Post: 6th July 2009, 08:32
  3. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  4. QSlider with a custom set of labels for the tick marks?
    By whitefurrows in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2007, 16:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.