How rename files .h .cpp in QtCreator

僤鯓⒐⒋嵵緔 提交于 2019-12-23 20:48:46

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/17185199/how-rename-files-h-cpp-in-qtcreator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!