Thanks for all the answers. 
My problem is really with the POCO library I'm using, I'll have to check that.
The output of qDebug left me confused and in doubt, but I wrote this code 
confirmed that Qt code was correct from the beginning:

QFile file("/home/marcelo/Documents/Test.pdf");
if (!file.open(QIODevice::ReadOnly)) {
    qDebug() << "file open error";
    return;
}

QByteArray ba_pdf = file.readAll();
file.close();

QFile f ("/home/marcelo/Documents/test_write.pdf");
if (!f.open(QIODevice::ReadWrite)) {
    qDebug() << "file write error";
    return;
}

QDataStream o(&f);
o << ba_pdf;
f.close();
return;

                                          
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to