使用QFileDialog 同时选择 文件和文件夹

关键属性
enum QFileDialog::FileMode
QFileDialog::Directory    2    The name of a directory. Both files and directories are displayed.

 

**只显示文件夹
enum QFileDialog::Option
QFileDialog::ShowDirsOnly    0x00000001    Only show directories in the file dialog. By default both files and directories are shown. (Valid only in the Directory file mode.)

原文地址:https://www.cnblogs.com/foxhengxing/p/1864312.html