Results 1 to 2 of 2

Thread: Rewind QFile

  1. #1
    Join Date
    Jul 2009
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Rewind QFile

    Can I read a file using QDataStream and the seek(0) function of the QFile to rewind? In doing so, I get strange results.
    Is there another way to get back to position 0?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Rewind QFile

    What you describe should work, if you are doing it correctly.
    What is "strange results"?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. QFile locks debug environment in QThread
    By nickolais in forum Qt Programming
    Replies: 1
    Last Post: 12th February 2009, 07:20
  2. QFile can't read a file
    By Raccoon29 in forum Qt Programming
    Replies: 3
    Last Post: 11th February 2009, 20:24
  3. QFile -> std::fstream
    By bhs-ittech in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2008, 10:02
  4. QXmlStreamReader rewind
    By bunjee in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2008, 08:00
  5. Passing QFile objecrt as parameter
    By db in forum Newbie
    Replies: 2
    Last Post: 28th August 2007, 16: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.