8168

Why are comments that start with “//!” colored blue in Qt Creator?

Qt Creator normally colors comments green, but I saw blue colored comments in the Qt Examples, and Qt Creator seems to color every comment that starts with //! in blue.

Here's an example screenshot:

<img src="https://i.stack.imgur.com/hyMdw.png" alt="enter image description here">

Is this some convention? What does the blue signify?

Answer1:

It's a Doxygen comment.

There are multiple styles:

Qt block comment:

/*! ... text ... */

Qt one-line comment:

//! ... one line of text ...

JavaDoc block comment:

/** * ... text ... */

JavaDoc one-line comment:

/// ... one line of text ...

Answer2:

Comments that begin with //! are the Qt style for code documentation as contrasted with regular comments. See the Doxygen manual for details on the structure of it, but basically, these kinds of comments are intended for automatic extraction into documentation about the code.

Recommend

  • How to implement the output of decision tree built using the ctree (party package)?
  • Star * symbol found on second line of Fortran function declaration
  • Doxygen and package.html
  • 08 is less than 1, but 07 is greater than 1 in DOS/Batch. Why?
  • Add PHP API documentation to vims balloonexpr [closed]
  • How to document a variable that isn't really there in Doxygen?
  • Missing/changed API when migrating from DNX to ASP.NET Core 2.0
  • Group by month+year with counts
  • How to debug 'value of ESP was not saved across function call' error?
  • Doxygen usage of \\includedoc
  • Zooming an element and its contents— an alternative to CSS3's zoom property?
  • Oracle SQL: Receiving 'no matching unique or primary key' error and don't know why
  • Xcode duplicated devices bug
  • QTP UFT Unable to find row count from table
  • How to make stdcall from Go
  • Undefined navigator.push React-native 0.43.4
  • npm 5.4.1 install/uninstall all failing
  • Multicolored edittext hint
  • why xml file does not aligned properly after append the string in beginning and end of the file usin
  • Chart.js Multiple dataset
  • Custom Tabgroup Appcelerator
  • $wpdb not working in file of WordPress plugin
  • Google Custom Search with transparent background
  • Disable Enter in editText android
  • Android fill_parent issue
  • Highlight and Bold text in JTextPane
  • Python CGI os.system causing malformed header
  • Algorithm for a smudge tool?
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Android screen density dpi vs ppi
  • How reduce the height of an mschart by breaking up the y-axis
  • Bug in WPF DataGrid
  • How to convert from System.Drawing.Color to Excel.ColorFormat in C#? Change comment color
  • Why doesn't :active or :focus work on text links in webkit? (safari & chrome)
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Jquery - Jquery Wysiwyg return html as a string
  • Confusion with PayPal's monthly billing cycle
  • Arrays break string types in Julia
  • Android Google Maps API OnLocationChanged only called once
  • java string with new operator and a literal