Now that we have successfully uploaded our first file to the FTP server, let's create the feature for downloading the file back onto our computer!
- First, open mainwindow.ui again and right-click on the Set Folder button. Select Go to slot... and pick the clicked() signal to create a slot function. The slot function is very simple; it will just open up a file selection dialog, but this time it will only let the user select a folder instead since we provided it with a QFileDialog::ShowDirsOnly flag:
void MainWindow::on_setFolderButton_clicked() { QString folder = QFileDialog::getExistingDirectory(this, tr("Open Directory"), qApp->applicationDirPath(), QFileDialog::ShowDirsOnly); ui->downloadPath->setText(folder); ...