Results 1 to 6 of 6

Thread: Qt and SCP

  1. #1
    Join Date
    Sep 2006
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Qt and SCP

    I was curious if it was possible to use Qt for using scp within a program for transferring files between two computers. If possible how might i go about trying to implement this? any help would be greatly appreciated.

    -Vash

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt and SCP

    Quote Originally Posted by Vash5556 View Post
    I was curious if it was possible to use Qt for using scp within a program for transferring files between two computers. If possible how might i go about trying to implement this? any help would be greatly appreciated.
    You can use QProcess to start external programs.
    J-P Nurmi

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

    Vash5556 (20th February 2007)

  4. #3
    Join Date
    Sep 2006
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt and SCP

    Quote Originally Posted by jpn View Post
    You can use QProcess to start external programs.
    Thank you so much for the help. That was a very interesting class that i overlooked.

  5. #4
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt and SCP

    AFAIK you could also implement a SCP socket in Qt... It may need some rather extended knowledge of networking in genral and SCP in particular but I'm pretty sure that it's possible. See the Simple chat example given with Qt. It shows how reimplementing a QAbstractSocket to make it work using a custom networking protocol.
    Current Qt projects : QCodeEdit, RotiDeCode

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

    Default Re: Qt and SCP

    The problem is SCP works over SSH, so you'd have to implement SSH first. And to implement SSH you'd have to implement SSL So it's probably easier to call scp through QProcess

  7. #6
    Join Date
    Jan 2006
    Location
    Innsbruck, Austria
    Posts
    62
    Thanks
    10
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt and SCP

    You may link your program to libssh and use the SFTP functions it includes. I'm using it in my program and it works nice. Feel free to ask me any questions. I'm in the libssh mailing list so you may ask there. If you need it, I can send you the class I use as a wrapper for libssh in my project, as long as your code is GPL.

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
  •  
Qt is a trademark of The Qt Company.