Qt learning and directory file dialog box

File dialog
as the name suggests, is used to select the file

 QFileDialog::getopenFileName(this,"选择一个文件", 默认路径);

Here Insert Picture Description
by

QFileDialog::getopenFileNames(this,"选择一个文件", 默认路径);

We can also select multiple files, but this time if we choose the directory, then there is no way for selection.

So we will use the directory dialog

QFileDialog::getExistingDirectory(this,"选择图片目录",默认路径);

Here Insert Picture Description

Published 46 original articles · won praise 39 · views 3351

Guess you like

Origin blog.csdn.net/bareheadedman/article/details/104550510