QFileDialog, how can i select only files, or only dirs, or files and dirs ?
-
QFileDialog, how can i select only files, or only dirs, or files and dirs ?
i use serFileMode(QFileDialog::Directory), i can select dirs and files, or only dirs...but i can''t only select files....
thank you! -
@opengpu2
QFileDialog::ExistingFile or QFileDialog::ExistingFile ? Is either one not sufficient? -
i want multi-select
-
@koahnig QFileDialog::ExistingFiles will open the selected dir
QFileDialog::ExistingFile will open the selected dir
QFileDialog::AnyFile will be ok Only when i first select a file, then whatever dir or files.. -
QFileDialog::Directory is all good , except that the first selected one must be Dir....if not, i can't click choose button...
-
@opengpu2
Not clear what you actually want IMHO.
Do you want to click multiple dirs plus files or have the possibilities of choosing multiple files only?
Either way is possible, isn't it?
The only logical way of handling when clicking a dir is to enter the dir and display files of subdir. -
i want all this in 1 dialog:
- select only files;
- select only dirs;
- select dirs and files...the first selected item is dir.
- select dirs and files...the first selected item is file.
-
anyone help?