QT Creator 如何使用 Doxygen 規範代碼註釋

一、下載插件

qtcreator-doxygen是Qt Creator的Doxygen插件,可以實現doxygen標準的註釋。

源碼下載地址:https://github.com/fpoussin/qtcreator-doxygen

插件下載地址:https://github.com/fpoussin/qtcreator-doxygen/releases

根據QT Creator的版本,選擇相應版本的插件下載:

 

二、安裝方式

If you downloaded a binary release, the paths are as follow:
	Unix: ~/.local/share/data/QtProject/qtcreator/plugins/<version>
	OSX: ~/Library/Application Support/QtProject/Qt Creator/plugins/<version>
	Windows: %LOCALAPPDATA%\QtProject\qtcreator\plugins\<version>
	Replace <version> with your Qt Creator version (ie: 4.8.0)

將 Doxygen-0.4.4-qtc4.0.x.dll 拷貝到

D:\Qt\Qt5.7.0\Tools\QtCreator\lib\qtcreator\plugins 目錄下,

 

三、啓用插件

重啓qt creator,在菜單的【幫助】欄選擇【關於插件】找到Doxygen 打上勾,然後就可以使用了。

四、快捷輸入

4.1、方法:在類、函數、變量上一行輸入 /**[Enter]

/**
 * @brief DllMain
 * @param hInstance
 * @param dwReason
 * @return 
 */
bool WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/ )

4.2、鼠標右鍵生成註釋

選中所需行右鍵選擇Document current entity選項,將會生成相應註釋

/**
 * @brief 
 *
 * @param version
 */
void doxygenTest(int version);

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章