Results 1 to 2 of 2

Thread: QFile -> std::fstream

  1. #1
    Join Date
    Aug 2006
    Posts
    25
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question QFile -> std::fstream

    I'm not sure if it belongs here or in general programming but here it goes.

    Is there a way to get a std::istream/std::ostream from a QFile object, or anything
    provided from a QFile object?

    Or should I only store the filename and open it as a std::fstream?

    I need the std:istream/std::ostream objects for an external library.

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFile -> std::fstream

    Quote Originally Posted by bhs-ittech View Post
    Or should I only store the filename and open it as a std::fstream?
    I'm not sure this is the ONLY way but I think this is the BETTER way.
    A camel can go 14 days without drink,
    I can't!!!

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

    bhs-ittech (9th June 2008)

Similar Threads

  1. QDir and QFile
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 27th September 2007, 14:43
  2. Passing QFile objecrt as parameter
    By db in forum Newbie
    Replies: 2
    Last Post: 28th August 2007, 17:09
  3. QFile and Creating Files
    By Jingoism in forum Newbie
    Replies: 2
    Last Post: 28th July 2007, 18:11
  4. How to write bytes read from serial port to a QFile
    By shamik in forum Qt Programming
    Replies: 19
    Last Post: 25th June 2007, 15:12
  5. QFile stream to SDL_mixer
    By doitux in forum Qt Programming
    Replies: 9
    Last Post: 2nd June 2007, 15:56

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.