Then you should create the data via QDataStream. You can't simply throw some random bytes to QDataStream and hope it's properly decoded afterwards.