Results 1 to 4 of 4

Thread: qfile seek

  1. #1
    Join Date
    Oct 2016
    Posts
    61
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question qfile seek

    Hi i have one document in word. And i want this document to separate in two documents with the text i wrote. I was trying to do a seek but was unsuccesfully. Some way to solve this?
    I tried to do this:
    file1.seek(servidor.size() - sizeotherfile );
    newfile.write(servidor.read(sizeotherfile));

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qfile seek

    What does it mean "unsuccesfully" ?

  3. #3
    Join Date
    Oct 2016
    Posts
    61
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: qfile seek

    not work normally i can seek files but now i can't i dont know why ;(

  4. #4
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: qfile seek

    Is servidor.size() smaller than sizeotherfile by chance? What happens to your code when that happens?
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

Similar Threads

  1. Replies: 2
    Last Post: 6th May 2013, 08:06
  2. Replies: 8
    Last Post: 17th May 2012, 11:09
  3. QFile::Seek() not working
    By derrickbj in forum Qt Programming
    Replies: 2
    Last Post: 5th October 2011, 20:14
  4. How to use the QFile::seek() in Qt-4.4.3
    By grsandeep85 in forum Qt Programming
    Replies: 2
    Last Post: 3rd April 2010, 11:54
  5. QFile, QTextStream, seek()
    By TheKedge in forum Qt Programming
    Replies: 4
    Last Post: 29th September 2006, 15:07

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.