Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How rename files .h .cpp in QtCreator

Tags:

qt

qt-creator

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.

like image 800
jtomaszk Avatar asked Jun 19 '13 07:06

jtomaszk


1 Answers

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.

like image 68
Pavel Strakhov Avatar answered Oct 06 '22 11:10

Pavel Strakhov