Results 1 to 2 of 2

Thread: current path

  1. #1
    Join Date
    Jun 2018
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Smile current path

    hi, i've build my project in disk E,and when i get my current path,it shows that my path is in disk C!!! How can i change the path same with build path?TIM截图20180614104512.jpg

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: current path

    If you want the current directory to be a directory with an EXE file, the best solution is to place this line in main()
    Qt Code:
    1. QDir::setCurrent(QCoreApplication::applicationDirPath());
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Change plarform folder path to root folder path
    By Alundra in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2015, 22:53
  2. Replies: 8
    Last Post: 17th October 2009, 08:10
  3. Qt 4 current directory path
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 7th May 2008, 18:58
  4. getting current Id from tableView
    By mkarakaplan in forum Newbie
    Replies: 3
    Last Post: 7th October 2007, 22:14
  5. How to know the current tab selected
    By Mrdata in forum Newbie
    Replies: 11
    Last Post: 6th February 2007, 19:46

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.