Results 1 to 8 of 8

Thread: how to read a file from another computer?

  1. #1
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    188
    Qt products
    Qt4
    Platforms
    Windows

    Default how to read a file from another computer?

    How to read a binary file on the other computer?
    Thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to read a file from another computer?

    What do you mean?
    What are the use case parameters?
    Or do you expect us to read you mind via telepathy?
    Show some interest in your own problem solving if you would like others to try and help you!
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    188
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to read a file from another computer?

    oh.

    There is a binary file on one computer,How to read it from my computer with QT?

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to read a file from another computer?

    Your second answer did not add any information to what you already have written.
    It is my guess you are you self clueless as to what actually you want to do.
    So first - make sure YOU know what it is you want to do before you ask US how to do it.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to read a file from another computer?

    Quote Originally Posted by weixj2003ld View Post
    oh.

    There is a binary file on one computer,How to read it from my computer with QT?
    There is a house in China. How to find it?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to read a file from another computer?

    Quote Originally Posted by weixj2003ld View Post
    How to read it from my computer with QT?
    You could take a flash drive, walk to the other computer, plug in the drive, copy the file to it, then take the drive out, go back to your machine, plug the drive, copy the file to the hard drive and then use QFile to access it. Or you could use one of the countless available protocols for network file transfer.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    188
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to read a file from another computer?

    I am sorry for my bad english.
    There is a binary file on one computer,I want to get it from my computer through Local Area Network,I think QFtp or QHttp may be used,but I do not know how to do?

  8. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: how to read a file from another computer?

    If you can access the file through a network share or mounted driver outside of Qt then you probably just use QFile directly

    If the file exists on a machine that has a running FTP server or HTTP server, and the file is accessible to that FTP or HTTP server, then you could use QFtp or QNetworkAccessManager (not QHttp) to access that server and retrieve the file.
    FTP (Chinese)
    HTTP (Chinese)

    If you can install and run a program of your own on the machine with the file then you can use QTcpSocket to create a server and client pair to transfer the file.

    Try to work out which option applies.

Similar Threads

  1. How to read from odf file..?
    By sreenidhi707 in forum Newbie
    Replies: 1
    Last Post: 18th July 2011, 11:47
  2. Read contents from the file using QHTTP Read()?
    By Gokulnathvc in forum Newbie
    Replies: 2
    Last Post: 21st June 2011, 08:03
  3. Read from a zip file
    By rajji_saini in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2011, 00:28
  4. is qt phonon can read realmedia file and divx file
    By fayssalqt in forum Qt Programming
    Replies: 1
    Last Post: 27th January 2009, 15:42
  5. Replies: 1
    Last Post: 20th June 2008, 18:43

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.