I am trying to display a number using QDebug in the Hex format. Below is the code which I have written. It is working but the output has string contents enclosed in double quot
int value = 0xff005542;
qDebug() << QString("%1").arg(value , 0, 16).toUpper();
>>> FF005542
That'll give you hex output at whatever length is required. But if you'd like fixed width output, this is handy (example of four hex digits):
int value = 0xff;
qDebug() << QString("%1").arg(value, 4, 16, (QChar)'0').toUpper();
// Here's the fixed field length⬆︎
>>> 00FF