Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Problem since Qt4.8 to select bundle with QFileDialog

$
0
0
Hello, I have a problem with QFileDialog with Qt4.8. I worked so far with Qt4.6.3 32bits on Mac 0S X 10.8.6. The problem was not in Qt4.6. It appeared when I tried moving to 4.8.4 32bits. The problem appears I try to select programatically a Mac « bundled directory » when creating a QFileFialog. 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.8.4 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.8, 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. I do not find anything about this, in documentation, nor support forum, nor release notes. Have you any idee ? Thanks very much,

Viewing all articles
Browse latest Browse all 22112