Usually you would want to stay single threaded as long as possible, meaning that you don't use blocking I/O on the socket but connect to its signals.
Also QDataStream is intended for communication between two Qt programs, it might add information to the data that is written into it, e.g. type information. So make sure that the other side is using the same QDataStream setup.
If the sensor is not using Qt at all, don't use QDataStream on the receiver send either.
If the data you receive is raw image data, then one way to create the image is to write into its buffer.
I.e. you create the QImage with the correct dimensions and depth and when image data is received you copy it into the image's data array. See QImage::bits().
Cheers,
_
Bookmarks