Qt 弹出系统本地目录选择目录或者文件夹
作者:互联网
-
选择目录: QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"), "/home", QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
-
选择文件
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "/home", tr("Images (*.png *.xpm *.jpg)"));
标签:Qt,tr,QFileDialog,文件夹,QString,home,Open,目录 来源: https://blog.csdn.net/yyj108317/article/details/104820847