This is C++ 101. You should be able to use a union for this:

Qt Code:
  1. union myConverter
  2. {
  3. std::uint32_t intVal;
  4. unsigned char[4] charVal;
  5. }
  6.  
  7. myConverter c;
  8. c.intVal = 16000;
  9.  
  10. // c.charVal[0] - [3] now contains the unsigned hex values
To copy to clipboard, switch view to plain text mode 

Of course, this assumes you have the same byte order on your target device. If not, you'll need to swap bytes around.