Results 1 to 2 of 2

Thread: Reading binary data

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Reading binary data

    Qt Code:
    1. QFile f("input");
    2. f.open(QFile::ReadOnly);
    3.  
    4. QFile f2("ouptut");
    5. f2.open(QFile::WriteOnly|QFile::Truncate);
    6.  
    7. QByteArray dat = f.readAll();
    8. f2.write(dat);
    9. f.close();
    10. f2.close();
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to wysota for this useful post:

    vermarajeev (13th August 2007)

Similar Threads

  1. problem with reading input data in qt
    By Ahmad in forum Qt Programming
    Replies: 3
    Last Post: 9th April 2007, 10:58
  2. reading DVD data and mpeg2 streams
    By guestgulkan in forum General Programming
    Replies: 1
    Last Post: 18th February 2007, 22:24
  3. reading and writing data from a QTableWidget
    By zorro68 in forum Qt Programming
    Replies: 4
    Last Post: 29th January 2007, 20:51
  4. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53
  5. How to convert binary data to hexadecimal data
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 8th March 2006, 16:17

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
  •  
Qt is a trademark of The Qt Company.