Results 1 to 5 of 5

Thread: How can I rename the filename & projectname in Project ?

  1. #1
    Join Date
    Aug 2010
    Posts
    5
    Qt products
    Qt4

    Default How can I rename the filename & projectname in Project ?

    Hi all ,

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

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How can I rename the filename & projectname in Project ?

    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)
    Qt Code:
    1. mv ./myProjectName.pro ./myNewProjectName.pro
    2. mv ./myProjectName.pro.user ./myNewProjectName.pro.user
    To copy to clipboard, switch view to plain text mode 

    2. Changing a filename on Linux
    Qt Code:
    1. mv ./myFile.h ./myNewFileName.h
    2. --> edit myNewProjectName.pro and change all occurences of myFile.h to myNewFileName.h
    To copy to clipboard, switch view to plain text mode 

    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.

  3. #3
    Join Date
    Aug 2010
    Posts
    5
    Qt products
    Qt4

    Default Re: How can I rename the filename & projectname in Project ?

    I have done it manully successfullly , but maybe it should be supported by qt creator later !
    Last edited by Qzi; 21st August 2010 at 06:39.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How can I rename the filename & projectname in Project ?

    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.

  5. #5
    Join Date
    Aug 2010
    Posts
    5
    Qt products
    Qt4

    Default Re: How can I rename the filename & projectname in Project ?

    It is a good idea ! But I'm a newer , How can I learn to write a plugin ? what's your point ? Thank you .

Similar Threads

  1. rename file name
    By weixj2003ld in forum Qt Programming
    Replies: 11
    Last Post: 8th April 2010, 10:27
  2. Copy/Rename project
    By thtran_usa in forum Qt Tools
    Replies: 2
    Last Post: 26th December 2009, 20:46
  3. QFile::rename()
    By Bagstone in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2008, 10:53
  4. How I add rename in QTreeWidgetItem?
    By rajesh in forum Qt Programming
    Replies: 5
    Last Post: 30th March 2007, 12:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.