qftp

Qt 5.2.0 ftp and QNetworkAccessManager

依然范特西╮ 提交于 2019-12-11 08:19:23
问题 I need to be able to create directories on my ftp server. I know that there's no QFtp in the 5.2.1 qt, so how do I mkdir with QNetworkAccessManager ? 回答1: QNetworkAccessManager doesn't support that 回答2: Although it is recommended to use QNetworkAccessManager as much as possible, you always fall back to the QtFtp add-on as follows: QT += ftp Then, you will be able to use the mkdir method of the QFtp class. 来源: https://stackoverflow.com/questions/22250898/qt-5-2-0-ftp-and-qnetworkaccessmanager

Qt, QCoreApplication and QFtp

廉价感情. 提交于 2019-12-11 07:17:04
问题 I want to use QFtp for the first time and googled a lot to find out how it should be used. This, among others is a typical example: #include <QCoreApplication> #include <QFtp> #include <QFile> int main(int argc, char ** argv) { QCoreApplication app(argc, argv); QFile *file = new QFile( "C:\\Devel\\THP\\tmp\\test.txt" ); file->open(QIODevice::ReadWrite); QFtp *ftp = new QFtp(); ftp->setTransferMode(QFtp::Active); ftp->connectToHost("ftp.trolltech.com"); ftp->login(); ftp->cd("qt"); ftp->get(