I'm sure this question has been asked before but it is difficult to search for "hex" although "hexadecimal" gets hits.

You will need to explain what you want more clearly. "Hex data char array" could mean a number of things.

Is the data stream coming from your serial interface:
  • A series of bytes of any value that you wish to convert to a hexadecimal string. That is the interface receives 8 bytes ( 0x51 0x74 0x43 0x65 0x6e 0x74 0x72 0x65 ) and you want to display the 16 character string "517443656e747265". Look at QByteArray::toHex () and QString::QString ( const QByteArray & ba ).
  • A series of text characters that are the hexadecimal representation that you wish to convert to a binary data array. That is, the serial port receives 16 bytes ("517443656e747265") and you wish to display the 8 character string "QtCentre". Look at QByteArray::fromHex() and QString::QString ( const QByteArray & ba )
  • Something else.