Is there a way to change a .pro , .ui and .h names if the project is done? How to do it?
To change class names you can use the Ctrl + Shift + R feature that changes class names in header files and source files. Show activity on this post. If you also want to rename a form and along with its class, you have to edit your name. ui file and change the widget name and class to the new corresponding value.
pro file is to list the source files that are involved in a project. Since qmake is used for building Qt and its associated tools, it knows Qt very well and can generate rules for invoking moc, uic, and rcc. As a result, the syntax is very concise and easy to learn.
You certainly don't have to use QtCreator to write a Qt program. You also don't have to use qmake but you are asking for trouble by not using it. To do anything even remotely interesting in Qt you will inevitably end up subclassing QObject .
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With