Results 1 to 3 of 3

Thread: QDir::setCurrent

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2015
    Posts
    35
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QDir::setCurrent

    Hi,

    I can't change the working directory using Qdir::setCurrent, it returns false
    I used it with QProcess
    Qt Code:
    1. QProcess process;
    2. QString cloneProject;
    3. bool cloneOk = false;
    4. QString dir = path;
    5.  
    6. qDebug() << QDir::current();
    7.  
    8. QDir::setCurrent(dir);
    9. QDir directory(dir);
    10. qDebug() << QDir::current();
    11.  
    12. cloneProject = "git clone ssh://user@host:port/"+project+".git";
    13. process.start(cloneProject);
    To copy to clipboard, switch view to plain text mode 
    Last edited by RegMe; 3rd June 2016 at 10:26.

Similar Threads

  1. QDir sort by QDir::Type problem
    By tsuibin in forum Qt Programming
    Replies: 1
    Last Post: 19th February 2016, 08:36
  2. How to use? And where to put QDir?
    By JaySDC in forum Qt Quick
    Replies: 12
    Last Post: 21st September 2015, 08:42
  3. QDir
    By smemamian in forum Newbie
    Replies: 3
    Last Post: 2nd April 2013, 07:55
  4. QDir::setCurrent with resource files
    By LarryERamey in forum Qt Programming
    Replies: 3
    Last Post: 20th April 2011, 02:21
  5. Is it me or QDir?
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 23:06

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.