Results 1 to 20 of 28

Thread: Binary files and conversion

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Binary files and conversion

    Quote Originally Posted by timmu View Post
    What I mean is how to read it byte by byte and do the conversion so that the output is a text file with numbers between 0 and 255.
    Just read from the input device using the QIODevice read API and use QString::number() on each byte, or read fixed sized blocks and create strings for each block by using QString::sprintf with as many arguments as you have bytes in your blocks.

    Cheers,
    _

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

    timmu (26th November 2012)

Similar Threads

  1. How to write and read from binary files
    By Momergil in forum Newbie
    Replies: 9
    Last Post: 28th November 2011, 11:58
  2. integrated + binary resource files
    By Le_B in forum Qt Quick
    Replies: 0
    Last Post: 5th June 2011, 16:45
  3. Reading Binary Files
    By archanasubodh in forum Newbie
    Replies: 1
    Last Post: 27th February 2008, 12:31
  4. How can I read Binary files with Qt
    By geo_saleh in forum Qt Programming
    Replies: 2
    Last Post: 16th August 2007, 10:37
  5. Concatenating two binary files
    By nbkhwjm in forum Newbie
    Replies: 13
    Last Post: 23rd April 2007, 03:30

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.