PDA

View Full Version : access to ftp server



peace_comp
29th May 2008, 00:37
Hi..
I want to use the webkit modul for an application .. it ' s about presenting some data on a map using google map API ..
till now everythg seems good!!
i would like to know if it s possible to access to an ftp server and modify the contain of a file ( I have to modify the xml file that contains my data that should be displayed on the map .. and that from my Qt application)??
if some one have an idea ??
thanks

ChristianEhrlicher
29th May 2008, 07:35
Did you try QFtp (http://doc.trolltech.com/4.3/qftp.html)? Download file, modify it locally and upload it again.

peace_comp
31st May 2008, 15:53
thanks..
well I m trying to use the qftp class ..
but I have a problem..I tried a simple exemple to put a file into the ftp server..but it doesnt work:



QFtp *ftp=new QFtp(this);
ftp->connectToHost("ensa2008.ifrance.com");
ftp->login("userName","Password");
ftp->rawCommand("put D:\kkk\webView\release\katie.bmp");
ftp->close();

so ..how can I know wht the problem is ??

thanks !!

jpn
31st May 2008, 16:34
QFtp works asynchronously like many other networking classes in Qt. For example QFtp::login() does not block but returns immediately. The stateChanged() signal is emitted when the state of the connecting process changes, e.g. to LoggedIn.