Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Does QTextStream::seek(qint64 pos) iterate through a file to reach the position?
Forum Updated to NodeBB v4.3 + New Features

Does QTextStream::seek(qint64 pos) iterate through a file to reach the position?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 609 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    polluxpolaris
    wrote on last edited by
    #1

    Is the iterative behavior of QDataStream::skipRawData(int len) similar to QTextStream::seek(qint64 pos)?

    I'm working with a data stream and I want to buffer an array vectors (QVector<double> *dataVectors[5]) to a QFile on hdd. I also want to be able to index into a previously saved QFile to retrieve my buffer. Ideally, I'd like to index directly into my QFile using QDataStream but it seems like I have to use skip, this can become prohibitive as my QFile grows larger.

    I looked at the source code for QIODevice::seek(qint64 pos) and it seems to rely on .skip(int len) anyways. Is it true that QIODevice:seek iterates through the file instead of indexing directly into the middle?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved