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. QFiles input with and without overwriting data
Forum Updated to NodeBB v4.3 + New Features

QFiles input with and without overwriting data

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.5k 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.
  • A Offline
    A Offline
    ahmed kato
    wrote on last edited by
    #1

    how to open a file and write some data after the last line written in the file and withou overwriting the old data...also howa to do like the file was empty and delete old data?? thx in advance

    Ahmed Kato
    Computer & communications student
    Intern and MSP at Microsoft

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fluca1978
      wrote on last edited by
      #2

      Something like:

      @myFile->open(QIODevice::Append)@

      should work.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgeyer
        wrote on last edited by
        #3

        Take a look at the various "OpenMode":http://doc.qt.nokia.com/latest/qiodevice.html#OpenModeFlag-enum flags.

        In addition, see "QFile::seek()":http://doc.qt.nokia.com/latest/qfile.html#seek and "QSeek:resize()":http://doc.qt.nokia.com/latest/qfile.html#resize.

        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