Results 1 to 6 of 6

Thread: Converting some element of QByteArray to Integer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2014
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Windows Android

    Default Converting some element of QByteArray to Integer

    Hi
    I'm trying to get the width of a bitmap from it's header. I open the bmp with QFile and with that i fill the QByteArray with file.readAll() func.
    The main concept was that i convert the QBA to Hexadecimal , and then convert the proper 4 bytest to integer.
    What I'm asking is, that is there any other possible ways to convert the 4 bytes of the QBA to integer?
    Last edited by s3l3ctr; 12th April 2014 at 21:48.

Similar Threads

  1. Replies: 12
    Last Post: 22nd August 2012, 14:45
  2. converting QByteArray to unsigned short
    By sattu in forum Qt Programming
    Replies: 16
    Last Post: 28th September 2010, 13:51
  3. storing integer 4bytes in QByteArray
    By babu198649 in forum Newbie
    Replies: 2
    Last Post: 30th November 2008, 10:08
  4. Converting to integer
    By Salazaar in forum Newbie
    Replies: 2
    Last Post: 15th June 2007, 20:11
  5. converting string to unsigned integer
    By mgurbuz in forum Qt Programming
    Replies: 4
    Last Post: 12th May 2006, 09:46

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.