Results 1 to 3 of 3

Thread: QT Creator Release location

  1. #1
    Join Date
    Dec 2010
    Posts
    23
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Windows

    Default QT Creator Release location

    I am trying to build a function into a program to open a file in the same folder. When I build the program from within the IDE does it open the file in the release folder in the "*-desktop-build/release" folder?

    So basically if I drop a index.txt file into that release folder and then build the program in QT creator, will that relative address work?
    Last edited by hojoff79; 28th January 2011 at 04:56.

  2. #2
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT Creator Release location

    You can use the static functions QDir::currentPath() and QDir::setCurrent() to do what you want.

  3. #3
    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: QT Creator Release location

    Or QCoreApplication::applicationDirPath() if you must always find the file relative to the application executable file regardless of what the current working directory is (there's a small chance this will fail though, see the docs). Another option is to include the file in the application resources and then you can always find it.

Similar Threads

  1. OSX only has Release Configuration
    By weaver4 in forum Newbie
    Replies: 4
    Last Post: 20th December 2010, 16:19
  2. [SOLVED] Re: QT Creator Only Building Release
    By dsargrad in forum Qt Tools
    Replies: 0
    Last Post: 17th November 2010, 20:36
  3. Qt Creator only builds the Release version!
    By Verse in forum Qt Tools
    Replies: 6
    Last Post: 12th January 2010, 09:38
  4. Replies: 2
    Last Post: 31st August 2009, 14:03
  5. Why not on release but debug
    By baray98 in forum Qt Programming
    Replies: 6
    Last Post: 10th August 2007, 10:08

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.