How to filter only execuatable files in Linux ?
How to filter only execuatable files in Linux ?
Set following property before displaying file dialog.
QFileDialog::setFilter(QDir::Executable)
Not work. Is something wrong with my code ?
The Qt documentation says that QDir::Executable needs to be combined with QDir:: Dirs or QDir::Files.
Read the docs about QFileDialog::setFilter(...)!
Qt Code:
To copy to clipboard, switch view to plain text mode
Still not work
Have any suggestion ?
Does anything happen when setting the filter? Does any other filter work for you?
It's nice to be important but it's more important to be nice.
Nothing
And I don't know why...
How do I set filter for retrieving list of files of type *.png AND *.jpg (or many more pic formats)?
Qt 5.3 Opensource & Creator 3.1.2
Have a look at the "Detailed Description" of QFileDialog. There you will find an example for multiple filters.
Last edited by sudhansu; 20th January 2010 at 07:09.
Ok, now I see this post of yours with the same topic... It is because:QDir::Executable 0x040 List files for which the application has execute access. The Executable value needs to be combined with Dirs or Files.
You have to use the bit operators like | & ^ ~. E.g. use QDir::Files | QDir::Executable.
Bookmarks