PDA

View Full Version : [Question]Qt Utils namespace, SftpChannel, and SshConnection.



Trep
3rd October 2011, 11:58
I'm working on a file-transfer application with Qt4, and i need to incorporate SFTP.
I know there are libraries such as libssh2; i want to try and keep my application mostly Qt based.

After a while of google searching, i came across these two class references:

http://doc.qt.nokia.com/qtcreator-extending/utils-sftpchannel.html
http://doc.qt.nokia.com/qtcreator-extending/utils-sshconnection.html


Simply doing
#include <Utils>

Like in the class references returns an error. (Specifically that it's not found.)
I'm thinking maybe i have to add something to my *.PRO (something like: QT += core network) only problem is i don't know what.

If anyone could point me in the proper direction on this, maybe an example? Most of the Qt Class references have them, it seems these do not though.

wysota
3rd October 2011, 16:43
You do understand what "QtCreator" is, right?

Trep
4th October 2011, 01:16
Yes. i do, and i was unsure if this is usable in an application, or if this was something else.
hence my creating this thread, and asking.

uranusjr
15th May 2012, 04:30
Don't know whether you still need the answer, but since I was just searching for about the topic I figure some reply might be useful for someone else...

The Util namespace, SftpChannel, SshConnection, along with many other components are not part of the Qt framework, but part of the Qt Creator source. Therefore you won't find anything about them in a Qt library, but only in the source (http://qt.gitorious.org/qt-creator) of Qt Creator.

Still, since Qt Creator is open-sourced and is freeware, you surely can use its code in your own application (with the right license, of course). I did take a look at the source, and it seems like that the components of Qt Creator are pretty nicely modularized, so it should be easy to extract the source you need and combine it with your own project if you know what to do.