Originally Posted by
Lesiok
First of all why in Qt code You are using readLine ? This method is for reading character data not binary.
I try using method read, such this
char * colData = new char [nd2*sizeof (unsigned long)];
qint64 colLength;// = nd2*sizeof (unsigned long);
//stStream.readBytes (colData, colLength);
colLength = fData.read (colData, nd2*sizeof (unsigned long));
if (colLength <= 0)
{
qDebug
() << __PRETTY_FUNCTION__ << i <<
QString ("Read error");
return;
}
delete [] colData;
char * colData = new char [nd2*sizeof (unsigned long)];
qint64 colLength;// = nd2*sizeof (unsigned long);
//stStream.readBytes (colData, colLength);
colLength = fData.read (colData, nd2*sizeof (unsigned long));
if (colLength <= 0)
{
qDebug () << __PRETTY_FUNCTION__ << i << QString ("Read error");
return;
}
QByteArray buff (colData);
delete [] colData;
To copy to clipboard, switch view to plain text mode
but error was arises. Which way I have to trace this error ?
Bookmarks