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. File Mapping? How can I do it using Qt?
Forum Updated to NodeBB v4.3 + New Features

File Mapping? How can I do it using Qt?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.7k 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.
  • F Offline
    F Offline
    fem_dev
    wrote on 9 Sept 2019, 15:07 last edited by
    #1

    Hi, I would like to do a File Mapping (like mmap on Unix and CreateFileMapping on Windows) using Qt in a plataform independend way.

    I saw that it is possible in a 2007 post of Qt Blog using the Qt QFile map() method.
    https://www.qt.io/blog/2007/10/15/file-mapping

    But I'm not found this map() documentation in the Qt 5.13 QFile official documentation:
    https://doc.qt.io/qt-5/qfile.html

    So now I have 2 doubts:
    a) Where is the QFile map() documentation?
    b) Can QDataStream object replace this QFile map() method? I mean, can I use QDataStream to read/write data in a disk file in any given file position without load it entirely on memory?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 9 Sept 2019, 15:10 last edited by
      #2

      Hi,

      Because it's in a parent class. See QFileDevice.

      When looking for a symbol that is not shown in the class documentation. Try the List of all members, including inherited members link.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply 9 Sept 2019, 15:58
      6
      • S SGaist
        9 Sept 2019, 15:10

        Hi,

        Because it's in a parent class. See QFileDevice.

        When looking for a symbol that is not shown in the class documentation. Try the List of all members, including inherited members link.

        F Offline
        F Offline
        fem_dev
        wrote on 9 Sept 2019, 15:58 last edited by
        #3

        @sgaist thank you!

        1 Reply Last reply
        0

        1/3

        9 Sept 2019, 15:07

        • Login

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