How rename files .h .cpp in QtCreator

2019-07-07 04:57发布

How rename source files in QtCreator? I have changed name of class but I don't see option to change files it containing. I'm using 2.7.0 version.

标签: qt qt-creator
1条回答
放荡不羁爱自由
2楼-- · 2019-07-07 05:23

If you're using qmake, renaming is easy. Find your files in "Projects" left panel and choose "Rename" in the context menu. Qt Creator will automatically edit .pro file replacing filenames.

This option doesn't work with cmake projects. If you're using cmake, you need to rename files outside of Qt Creator. May be you then need to adjust your CMakeLists.txt file to include new filenames in the project.

查看更多
登录 后发表回答