打开 Qt Creator,菜单选择:工具 -> 选项 -> 文本编辑器 -> 片段。点击“添加”按钮,编辑自定义的“触发”。
打开 Qt Creator,菜单选择:Tools->Options->Text Editor->Snippets->Text->Add
使用:代码中输入出发 header ,弹出custom, 回车选中即可
/**
* @fileName %{CurrentProject:FileName}
* @brief
* @author Mr.Song
* @date %{CurrentDate:yyyy-MM-dd}
*/
qt内部变量大全
%{#:<value>
%{Config:DefaultProjectDirectory}
%{Config:LastFileDialogDirectory}
%{Cpp:LicenseTemplate}
%{Cpp:LicenseTemplatePath:FileBaseName}
%{Cpp:LicenseTemplatePath:FileName}
%{Cpp:LicenseTemplatePath:FilePath}
%{Cpp:LicenseTemplatePath:NativeFilePath}
%{Cpp:LicenseTemplatePath:NativePath}
%{Cpp:LicenseTemplatePath:Path}
%{CurrentBuild:Env:<value>}
%{Cur