How to change a project's name in QtCreator?

sunset picture sunset · Jul 29, 2011 · Viewed 33.6k times · Source

Is there a way to change a .pro , .ui and .h names if the project is done? How to do it?

Answer

gnud picture gnud · Jul 29, 2011

Names for .ui, .h and .cpp files can just be changed inside Qt Creator.

The name of the .pro file is a bit more involved. The simplest is probably to copy the project, rename the .pro file, and reopen.

Qt Creator also uses its own config file, .pro.user, for changes you do in the project and build settings. You can just delete the .pro.user-file, and it'll generate a new one. If you've made changes to the settings and the build process, you can rename that file as well, but remember to read through it and check build paths etc.

Edit by anonymous: Run qmake to generate a new Makefile with updated references to the project name