Results 1 to 5 of 5

Thread: Reading File using QFile and QTextStream

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Reading File using QFile and QTextStream

    Quote Originally Posted by atm
    I'm not sure. How do I figure that out?
    The easiest way is to use hexeditor. CR is 0x0d and LF is 0x0a. Under Unix text files have only LF at the end of line and that's what QTextStream expects. Maybe those files were created on Mac (it uses CR, so it could fool QTextStream)?

  2. The following user says thank you to jacek for this useful post:

    atm (13th July 2006)

  3. #2
    Join Date
    Jan 2006
    Location
    USA
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    2

    Thumbs up Re: Reading File using QFile and QTextStream

    Thank you, that did the trick. I replaced all the 0ds with 0as in khexedit, works like a charm.

Similar Threads

  1. Qfile and QTextStream
    By sreedhar in forum Qt Programming
    Replies: 1
    Last Post: 28th June 2006, 10:43
  2. QSettings vs (QFile + Qtextstream)
    By nupul in forum Newbie
    Replies: 5
    Last Post: 10th April 2006, 07:26
  3. segfault on qtextstream
    By patcito in forum Qt Programming
    Replies: 13
    Last Post: 26th February 2006, 13:10
  4. create file in another directory
    By raphaelf in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 10:04

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.