I don't want to choose a directory, but I have to double click them to navigate within the dialog.
I don't want to choose a directory, but I have to double click them to navigate within the dialog.
Aha, now I realize the problem:
- with filter "Designer UI files (*.ui)" one can follow "Sample Images" shortcut because it's not acceptable file type
- with filter "All Files (*)" one can't follow "Sample Images" shortcut because it's acceptable file type
So, basically the problem is with Windows file dialog since it treats a directory shortcut as a file... right? You could work this around with QFileInfo::isSymLink() and QFileInfo::sysLinkTarget(). However, I'd suggest constructing a filter from QImageReader::supportedImageFormats(). First of all, it solves the problem and secondly, the user will be able to choose only supported image types.![]()
J-P Nurmi
You're exactly right. Thanks for clearing up exactly why this happens! I found out that this is a bug which is set to Fixed in 4.3.3. so for now I'll just ignore it.
I do pass on QImageReader::supportedImageFormats(), but it's good custom to provide the option "All files(*.*)". Even designer does it.![]()
Bookmarks