QFileDialog* fileDialog = new QFileDialog(this);
fileDialog->setWindowTitle("Choose Source Directory");
//fd->setDirectory(buf);
fileDialog->setFileMode( QFileDialog::DirectoryOnly );
QStringList fileName;
if ( fileDialog->exec() == QDialog::Accepted )
{
fileName = fileDialog->selectedFiles();
//srcDir.setPath(fileName.at(0));
ui->textBrowser_ANPRResult->append(fileName.join(","));
}
else
{
return;
}
qt QFileDialog 获取目录
最新推荐文章于 2024-09-20 18:43:05 发布