PDA

View Full Version : File Transfer in Qt



Rajeshsan
25th January 2010, 07:33
HI to all......
I want to transfer file (any file) from PC to another PC from serial port or Ethernet port in Qt 4.5.2. I need an assistance how to do it.Suggest me some code or idea.How to make packets by adding headers and footers to a packet it has to arrange in same form and saved in same extension at the destination.

Thanking all

wagmare
25th January 2010, 07:36
use QTcpSocket() , QTcpServer() ... check Network examples in Qt ..

vishwajeet.dusane
25th January 2010, 09:47
Hi

you can Qt example with some modification offcource.

<UR_QT_DIR>/examples/network/fortuneclient
<UR_QT_DIR>/examples/network/fortuneserver

Modify these examples to send file contents. I think that pretty easy to do :cool:

Rajeshsan
25th January 2010, 10:53
Hi Vishwajeet..
I have to send file of any type or extension like pdf,doc,jpeg,png. My aim is to get data and packetise it with headers and footers, then at the same time at the destination headers and footers should be removed and saved in same extension. OR there is any other idea, I want to transfer data packet in to serial port then execute the same file after finishing transfer.can you help me...........

vishwajeet.dusane
25th January 2010, 13:01
sure, what kind of help u want ? do u want me to write that application for you ?

Rajeshsan
27th January 2010, 07:59
No sir, First I need to send a packet of information like size and file type but i need to send data also next packets and finally EOF end of file packet also. I need to get simple code just to send a string or file thru a socket. Im working on ARM Board. I saw example of Client and server. But my problem is At the destiny how to recognise and save it proper file extension.
Plz send me if you have simple code to send some string or data on socket, whether at the end you ahve to get same file or string...

astrude
11th February 2011, 05:13
hello.. i am also doing a file transfer application using tcpsocket
i am a newbie and it is my first time programming in qt,
i also already studied the fortune client and server application.
my problem is how to load a file from the phone so that i can send it through a network.
how am i am able to load this file and transmit it?

please, i really need your help.
its my senior project..