problem with QDataStream & QDataStream::operator>> ( char *& s )

Posted by yan bellavance on Stack Overflow See other posts from Stack Overflow or by yan bellavance
Published on 2010-04-22T18:35:03Z Indexed on 2010/04/22 20:33 UTC
Read the original article Hit count: 263

Filed under:
|
|
 QFile msnLogFile(item->data(Qt::UserRole).toString());
 QDataStream logDataStream;
    if(msnLogFile.exists()){
        msnLogFile.open(QIODevice::ReadOnly);
        logDataStream.setDevice(&msnLogFile);
        QByteArray logBlock;
        logDataStream >> logBlock;
    }

This code doesnt work. The QByte that results is empty. Same thing if I use a char* . Oddely enough the same code works in another program. Im tying to find the difference between both. This works if i use int,uint, quint8, etc

© Stack Overflow or respective owner

Related posts about c++

Related posts about qt