Results 1 to 20 of 30

Thread: Saving a file using a relative path

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2014
    Posts
    59
    Thanks
    7
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Saving a file using a relative path

    Quote Originally Posted by d_stranz View Post
    That's exactly the point. You don't really know if the QFileDialog is changing what Qt thinks is the current path or not, and making the assumption that somehow QFileDialog pushes the current path onto some kind of stack and then pops it back off when it goes out of scope might be a wrong assumption.
    Yeah I can be pig headed sometimes. The next couple days are going to be busy for me, but I will report back with the results when I get the chance.

    I did check the current path in several places; before and after the QFileDialog call, for example, but did not think to scope it out.

  2. #2
    Join Date
    Apr 2014
    Posts
    59
    Thanks
    7
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Saving a file using a relative path

    Change of plans so...

    I setup the dialog as suggested, and scoped it out from the declaration to exec(). Checked the current directory before the block, at the end of the block, after the block, and in the slot. The current directory never changed from the application directory. The file still would not copy, until I added the whole path. Before using the whole path, I also changed it so I could get the error message, which was the same as originally; Error: "Cannot create /projects/Test/7segment2.csv for output".

Similar Threads

  1. Replies: 0
    Last Post: 14th September 2013, 10:14
  2. Replies: 16
    Last Post: 24th January 2013, 02:52
  3. Downloading a file and saving in a path
    By StarRocks in forum Qt Programming
    Replies: 19
    Last Post: 3rd January 2013, 06:43
  4. qmake absolute vs relative LIBS path
    By TheShow in forum Newbie
    Replies: 7
    Last Post: 12th October 2010, 14:40
  5. Replies: 8
    Last Post: 17th October 2009, 08: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
  •  
Qt is a trademark of The Qt Company.