coderbob
30th November 2007, 00:49
If I am using
QLineEdit *le = new QLineEdit();
le->setText("aabbccdd");
QByteArray hexData = QByteArray::fromHex(le->text().toAscii());
Is QByteArray going to encode it by the systems endian or is going to respect the order given in the QLineEdit?
qebug() << hexData.toHex();
Debug appears to keep the byte order given, but if I am to use QByteArray::toInt() and back to hex etc do I need to track endian or will Qt do it for me?
Bob
QLineEdit *le = new QLineEdit();
le->setText("aabbccdd");
QByteArray hexData = QByteArray::fromHex(le->text().toAscii());
Is QByteArray going to encode it by the systems endian or is going to respect the order given in the QLineEdit?
qebug() << hexData.toHex();
Debug appears to keep the byte order given, but if I am to use QByteArray::toInt() and back to hex etc do I need to track endian or will Qt do it for me?
Bob