If you call toUint on the text "1234", it will return the number 1234.

Your 32-bit unsigned number stored in a QByteArray clearly isn't text, so toUint clearly isn't going to do the job.

The question is, why not just do it yourself? For example, uint32 = array[0] << 24 | array[1] << 16 | array[2] << 8 | array[3] for example?