Transfer Files over network
-
Hi!
I am developing a chat application whose concept is like SimpleChat application.
Please guide me what is the best way to transfer file(.pdf,.png,.jpg etc) over network.
Thanks!!
-
For Images some thing like this. I can be something like this.
@
QByteArray ba;
QImage image;
QBuffer buffer(&ba);
image.save(&buffer, "PNG");
socket->write(ba);QFile file("in.pdf"); if (!file.open(QIODevice::ReadOnly) return; while (!file.atEnd()) { QByteArray line = file.readLine(); socket->write(line); }
@
I have not tried with pdf though
-
Thanks for reply!
Could you Please refer more link or documentation.
-
You refer the Qt Assistant documentation itself. If you want any ready program, I can make it and give you.