Thanks guys.
But I cant pass QDataStream because this error:
initializing argument 1 of `void DataThread:luginData(QDataStream)'
d:/Programy/QT_4.4.1/include/QtCore/../../src/corelib/io/qdatastream.h `QDataStream::QDataStream(const QDataStream&)' is private

And about passing socket. Application writes quite quickly to this socket and I dont know whether it is a good idea.

Is there any other way how to use QByteArray and tell stream where to read from?