PDA

View Full Version : Qt Creator How can I rename the filename & projectname in Project ?



Qzi
19th August 2010, 23:16
Hi all ,

Easy question , but I am in trouble "How can I rename the filename & projectname in Project ?" . Thank you !

tbscope
21st August 2010, 06:28
That doesn't seem to be easy in Qt Creator itself.

How to do it manually:
Always close your project first.

1. Changing the project name on Linux (other systems are almost the same)

mv ./myProjectName.pro ./myNewProjectName.pro
mv ./myProjectName.pro.user ./myNewProjectName.pro.user

2. Changing a filename on Linux

mv ./myFile.h ./myNewFileName.h
--> edit myNewProjectName.pro and change all occurences of myFile.h to myNewFileName.h

3. Replacing files
Similar, move it, edit the .pro file.

Afterwards, reopen your .pro file and everything is like you changed it.

This would be nice to have out of the box in Qt Creator though.

Qzi
21st August 2010, 06:32
I have done it manully successfullly , but maybe it should be supported by qt creator later !

tbscope
21st August 2010, 06:36
I think Nokia should make this available too.
But, Qt Creator is very very easy to expand :-)
I don't think it would be very difficult for someone to write a plugin for renaming files.

Qzi
21st August 2010, 06:40
It is a good idea ! But I'm a newer , How can I learn to write a plugin ? what's your point ? Thank you .