正在学习用qtcreator,不过看到例子代码中,这种//! []类型的东西不知道起什么作用,这个不是注释,具体代码如下:
//! [0]
#include <QtWidgets>
#include "mainwindow.h"
//! [0]
//! [1]
//this method contain all widget of this project
MainWindow::MainWindow()
//! [1] //! [2]
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这是 qdoc 语法,是为了 qt 项目生成文档用的。
在 C++ 的代码中出现的 // 都是注释,如果只关注 代码本身的话,你是不用理会的