Results 1 to 7 of 7

Thread: File Transfer in Qt

  1. #1
    Join Date
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Arrow File Transfer in Qt

    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
    Last edited by Rajeshsan; 25th January 2010 at 10:47.

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: File Transfer in Qt

    use QTcpSocket() , QTcpServer() ... check Network examples in Qt ..
    "Behind every great fortune lies a crime" - Balzac

  3. The following user says thank you to wagmare for this useful post:

    Rajeshsan (25th January 2010)

  4. #3
    Join Date
    Sep 2009
    Posts
    72
    Thanked 10 Times in 10 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: File Transfer in Qt

    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

  5. The following user says thank you to vishwajeet.dusane for this useful post:

    Rajeshsan (25th January 2010)

  6. #4
    Join Date
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: File Transfer in Qt

    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...........

  7. #5
    Join Date
    Sep 2009
    Posts
    72
    Thanked 10 Times in 10 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: File Transfer in Qt

    sure, what kind of help u want ? do u want me to write that application for you ?

  8. #6
    Join Date
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Arrow Re: File Transfer in Qt

    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...

  9. #7
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: File Transfer in Qt

    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..

Similar Threads

  1. QTcpSocket problem in file transfer
    By omprakash in forum Qt Programming
    Replies: 6
    Last Post: 25th January 2010, 09:18
  2. File Transfer with QTcpServer and QTcpSocket
    By NoRulez in forum Qt Programming
    Replies: 2
    Last Post: 21st October 2009, 18:12
  3. Socket File Transfer
    By jmqt in forum Newbie
    Replies: 1
    Last Post: 16th July 2009, 14:24
  4. Replies: 2
    Last Post: 2nd April 2008, 18:28
  5. How to transfer file through serial communication
    By shamik in forum Qt Programming
    Replies: 29
    Last Post: 29th May 2007, 11:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.