Next, open up mainwindow.h and add the following headers:
#include <QMainWindow> #include <QDebug> #include <QNetworkAccessManager> #include <QNetworkRequest> #include <QNetworkReply> #include <QFile> #include <QFileInfo> #include <QFileDialog> #include <QListWidgetItem> #include <QMessageBox>
After that, add in the following variables and functions:
private: Ui::MainWindow *ui; QNetworkAccessManager* manager; QString ftpAddress; int ftpPort; QString username; QString password; QNetworkReply* downloadFileListReply; QNetworkReply* uploadFileListReply; QNetworkReply* uploadFileReply; QNetworkReply* downloadFileReply; QStringList fileList; QString uploadFileName; QString downloadFileName; public: void getFileList();
Once you ...