How to convert a Byte to Qbitarray;
-
Hallo!!
If i have a byte = 0xFF how can i convert this to Qbitarray = 0b11111111 ;
Thanx in advance!
-
Hi,
Here's a wiki "entry":http://qt-project.org/wiki/WorkingWithRawData explaining that
-
Can someone explain how works this section
@// Convert from QByteArray to QBitArray
for(int i=0; i<bytes.count(); ++i)
for(int b=0; b<8; ++b)
bits.setBit(i*8+b, bytes.at(i)&(1<<(7-b)));@This is from the wiki entry