Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.7.0, 4.7.4, 4.8.4
-
None
-
mac OSX 10.6.8
-
-
Qt 4:264f201136c4fffeaa131a9ae562187ad2ef45ad Qt 5:570cf51919515c4e49b3dfa3723ea154ae04fd73
Description
Hello,
I have a problem with QFileDialog since Qt4.7.0.
I worked so far with Qt4.6.3 32bits on Mac 0S X 10.6.8. The problem was not in Qt4.6.
It appeared when I tried moving to 4.8.4 32bits (I try with Qt4.7 after that).
The problem appears when I try to select programatically a Mac « bundled directory » when creating a QFileDialog. The bundle should be considered as a standard file on the mac, not as a directory.
With Qt4.6 it works well : the Bundle is selected in the QFileDialog.
But with Qt4.7.0 the QFileDialog goes into (opens) the bundle with no file selected : the bundle is treated as a standard directory.
If I go back into the repository where the bundle is, then select the bundle manually, I can’t go inside, which is normal.
Hence, the problem appears when selecting the bundle programatically, but not « manually ».
Here is a code example:
QFileDialog fileDialog(g_mainWindow,
tr("Save project as"),
"/Applications",
"application (*.app)");
fileDialog.setAcceptMode(QFileDialog::AcceptSave);
fileDialog.setFileMode(QFileDialog::AnyFile);
fileDialog.selectFile("iCal.app");
//fileDialog.setOption(QFileDialog::DontUseNativeDialog);
⇨ /Applications/iCal.app is a bundle
⇨ the QFileDialog ends in the /Applications/iCal.app directory where it should end in /Applications/ and SELECT /Applications/iCal.app
I tried to use setOption(QFileDialog::DontUseNativeDialog), it works fine with Qt4.7, but the look of the window is not that I want.
I also tried using a static method of QFileDialog, but it doesn’t work better.
On mac OSX 10.6.8 :
Qt 4.6.3 32bits : OK
Qt4.7.0 32bits : problem
Qt4.7.4 32bits : problem
Qt 4.8.4 32bits : problem
Qt 4.8.4 64bits : problem