blackbubblegum
20th February 2012, 07:07
Hi,
I need to get a list of files from a ftp server and as Qt-Doc recommended wanted to use the QNetworkAccessManager for that. But I have no clue where to start. With QFtp everything is so easy :).
My code to connect isbasically this:
QNetworkAccessManager* qnam = new QNetworkAccessManager(this);
QUrl url = QUrl();
url.setHost(QString("host"));
url.setUserName(QString("user"));
url.setPassword(QString("pswd"));
url.setPort(21);
QNetworkRequest nRequest(url);
this->qnam->get(nRequest);
But the ftp server log doesn't show any response to this. Which it did, when I tried QFtp.
Is there somewhere a nice tutorial for QNam or even good sample code for this?
Thanks for your help,
bbg
I need to get a list of files from a ftp server and as Qt-Doc recommended wanted to use the QNetworkAccessManager for that. But I have no clue where to start. With QFtp everything is so easy :).
My code to connect isbasically this:
QNetworkAccessManager* qnam = new QNetworkAccessManager(this);
QUrl url = QUrl();
url.setHost(QString("host"));
url.setUserName(QString("user"));
url.setPassword(QString("pswd"));
url.setPort(21);
QNetworkRequest nRequest(url);
this->qnam->get(nRequest);
But the ftp server log doesn't show any response to this. Which it did, when I tried QFtp.
Is there somewhere a nice tutorial for QNam or even good sample code for this?
Thanks for your help,
bbg