QString setFilepath = QFileDialog::getExistingDirectory(nullptr, "选择文件夹"); 此时setFilepath里面存储的就是选择的文件夹的地址。