Is there any to change the default boilerplate code in the .cpp file when creating a new project in Qt Creator?
Currently, new C++ projects open with:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
and I would like to change it.
It's explained here https://doc.qt.io/qtcreator/creator-project-wizards.html and for C++ projects you'll find the default main.cpp
boilerplate code in qtcreator/templates/wizards/projects/plaincpp
.
So basically you need to define a new custom wizard.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.