i am using QT software in solaris,
i opened remote system through QFtp methods i.e.. connectToHost()
after that, loged in through login().
now my problem is, i am trying to get data from remote system, through
int get ( const QString & file, QIODevice * dev = 0 )

at first argument i am giving "file name" to download from remote sys., where should i store downloaded file in local system , why we are using QIODevice, how to use QIODevice in get fuction

QIODevice is a base class for basically anything in Qt that can be considered a read/write device, such as QFile.

In the function call

int get ( const QString & file, QIODevice * dev = 0 )

-QString reference file is the source on the server
-QIODevice pointer variable dev is the local destination for storage. Purpose of QIODevice in the parameter is that the file can be also stored in other formats than QFile.

You can provide a QFile pointer, QBuffer pointer or a socket pointer as dev. If dev is 0, then the readyRead() signal is emitted when there is data available to read. You can connect this signal to a slot and catch the file somewhere in your code.

can i use my home path i.e.. /homae/user as QIODevice for storing file to local system

can i use my home path i.e.. /homae/user as QIODevice for storing file to local system

Yes and no. First you need to make a QFile, set current directory to /home/user with QDir and then provide the file to QFtp::get

1)now i am able to download file, but problem is, After downloading some bytes of data i am closing application and starting again then at that time it is starting as fresh download.. but i want to restart from where i have closed..

2)How to know size of file using Qftp on server side

3)do i have any other possibilite other than QFtp for downloading file..

the documents which u have given belongs to qt4.6 but i am working in qt3.3.0 version.. so their are some modifications like---> in get method their is no third parameter i.e QFtp::binary

This article has been dead for over six months. Start a new discussion instead.