Results 1 to 1 of 1

Thread: SOLVED int to binary to qstring

  1. #1
    Join Date
    Jun 2013
    Posts
    46
    Thanks
    24
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default SOLVED int to binary to qstring

    SOLVED
    Apologies

    found answer within related forum @
    http://www.qtcentre.org/threads/6386...tation-QString

    Kind Regards

    Good Day,

    How Do I store the binary value of an quint8 in a QString

    I know how to output value in binary
    as cout << bin << value;

    But how do i store that data in QString with padded zero's

    Example
    value = 35
    convert to Binary value = 100011
    add zeros in front to make 8bits(assignment requirements)
    '00'100011

    //The padding i can get right but i first need to store the binary data as QString

    #newbie in Binary compilation
    Assistance please
    Last edited by 2lights; 16th September 2013 at 15:16. Reason: updated contents

Similar Threads

  1. QString to Binary Problem
    By onder_11 in forum Qt Programming
    Replies: 5
    Last Post: 22nd October 2012, 02:43
  2. QVariant to QString (binary)
    By 8080205 in forum Newbie
    Replies: 1
    Last Post: 9th October 2012, 12:22
  3. How can I read binary data to QString?
    By zolookas in forum Newbie
    Replies: 2
    Last Post: 29th July 2008, 20:03
  4. Read binary file and convert to QString
    By jaca in forum Qt Programming
    Replies: 12
    Last Post: 13th June 2008, 23:05
  5. Replies: 1
    Last Post: 2nd April 2007, 22:52

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.