Results 1 to 2 of 2

Thread: QFileInfo::filePath and std::ofstream

  1. #1
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Thanks
    62
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QFileInfo::filePath and std::ofstream

    I am using QFileInfo::filePath method to open the file with std::ifstream. It appears that "/" delimeter is not recognized by std::ifstream on Windows.

    Question: How to get "native" file path out of QFileInfo in order to use it with std::stream classes?

  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: QFileInfo::filePath and std::ofstream


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

    TorAn (2nd December 2010)

Similar Threads

  1. QFileInfo
    By ishkabible in forum Qt Programming
    Replies: 3
    Last Post: 20th September 2010, 00:08
  2. pixmap filepath in property editor
    By purga in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 13:49
  3. Is there such a way QFileInfo
    By baray98 in forum Qt Programming
    Replies: 9
    Last Post: 21st April 2008, 03:23
  4. Replies: 2
    Last Post: 8th April 2008, 10:35
  5. about QFileInfo
    By Pang in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2006, 10:09

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.