Qt ------ QFileDialog

QString strFile = QFileDialog::getOpenFileName(this,QStringLiteral("选择Excel文件"),"",tr("Exel file(*.xls *.xlsx)"));

QString str_dir = QFileDialog::getExistingDirectory(this, tr("select Directory"),"/home",QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
原文地址:https://www.cnblogs.com/god-of-death/p/9519510.html