Results 1 to 3 of 3

Thread: Files added to the wrong .pro file

  1. #1
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Files added to the wrong .pro file

    I have my .pro file, GameClient.pro, and I have several other .pro files included by GameClient.pro using "include(myOther.pro)".

    When I create a new file in QtCreator (.cpp or .h), the file is added to one of the other .pro files, and I can't figure out why (this is with QtCreator 2.6.2).

    qtcreatorpro.jpg

    I'd have thought that it'd be added to the main .pro file (the actual "project" loaded by QtCreator) not the .pro files that QtCreator merely detects as include()'d by the main .pro?

    Does anyone have any awesome insight into this? =)
    Thank you for taking the time to read my problem.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Files added to the wrong .pro file

    The PRO file used depends a little on where and how you added the new files, which we cannot see in your screen shot. However, if you used the Qt Creator Add New.. then you are prompted to select which of the PRO files in your project the files are added to. It defaults to the PRO file matching the project folder you opened the context menu for or, if you used the File menu, the project containing the current open file.

    The convention of naming included files *.pri is probably of assistance here because Qt Creator will not generally modify these.

  3. The following user says thank you to ChrisW67 for this useful post:

    ComServant (13th February 2013)

  4. #3
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Files added to the wrong .pro file

    Thanks, I hadn't noticed the drop-down in the wizard.
    Since these .pro files are in the same directory, it must've been choosing API_Boost52.pro first because of alphabetical order.

    Renaming them to *.pri worked. Thank you very much!

Similar Threads

  1. Replies: 2
    Last Post: 25th September 2012, 03:38
  2. Replies: 14
    Last Post: 2nd August 2011, 12:42
  3. Monitor a new added File
    By designer.software in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2010, 09:50
  4. Automatic file extension is not added to saved file on mac os x
    By sanjayshelke in forum Qt Programming
    Replies: 0
    Last Post: 30th October 2009, 06:56
  5. Replies: 3
    Last Post: 21st August 2009, 11:39

Tags for this Thread

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.