how to set filter for directories qt qfiledialog
Posted
by sneha
on Stack Overflow
See other posts from Stack Overflow
or by sneha
Published on 2010-04-30T12:12:24Z
Indexed on
2010/04/30
12:17 UTC
Read the original article
Hit count: 474
qt
|qfiledialog
hello everyone,i would like to know is there any way to select only some directories and some files at a time using qfiledialog class.here i set filesfilter..but i also need to set folder filter i mean i want only certain/some folders to be selected of name (i mean i need a filter for folders too.. coz i hav a common format for my application folders like example : name.abc,flight.abc etc all these are my folder names..i want to enable selection only for these type of folders which are named at last as .abc) i am using
QStringList files = QFileDialog::getOpenFileNames(this, tr("Files & Directories"), QDir::currentPath(),tr(".doc.txt") );
tr(".doc.txt") is my files filter,same way i need folders filter with name only .abc at the end
© Stack Overflow or respective owner