Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.9.1
-
None
-
ubuntu 16.04
Description
Recently, I am learning QT. I want to use QFileDialog to open some file. But I don't want to use native dialog, so I set QFileOption::DontUseNativeDialog to true. It works, and I can see QT own QFileDialog.
But there is a problem. If I use native dialog, it will select the first item by default when I enter a folder. But QT own QFileDialog doesn't act the same. Exactly, it works wrong.
Here is the detail.
When I open a QFileDialog, it select nothing, and the open button is disabled.
Then I select a file manully, and the open button is enabled.
Then I enter another folder, but it selects nothing in the folder. What's more the open button is still enabled.
Finally, I click the open button, and I get a file returned. But its path is not correctly. Its path is /tmp/VMwareDnD/config-err-2Emdj0. But the right path should be /tmp/config-err-2Emdj0
What should I do to solve this problem?
https://forum.qt.io/topic/95464/qfiledialog-returns-wrong-path/2
https://bugreports.qt.io/browse/QTBUG-2947
Attachments
Issue Links
- relates to
-
QTBUG-71415 When navigating backwards/forwards through the QFileDialog history it should remember the files that were selected too
-
- Closed
-
-
QTBUG-2947 QFileDialog inconsistancies
-
- Closed
-