Qt 用户通过对话框选择文件

void class::on_pushButton_clicked()
{
    fileFullPath = QFileDialog::getOpenFileName(this, tr("Select a File"), ".", tr("Images (*.png *.xpm *.jpg)"));
}
原文地址:https://www.cnblogs.com/liujx2019/p/11133200.html