Important: Please read the Qt Code of Conduct -

QFileDialog::getOpenFileName - Odd modal behavior on Mac

  • So I have my application's main window opens a custom QDialog-derived class that is a modal dialog. That dialog, based on a button press, opens the QFileDialog via the convenience method getOpenFileName. On Windows, it opens the standard windows open file dialog, and on Mac, it opens the Mac Finder window. So far so good.

    Now here's my problem: On Windows, the open file dialog is modal as it needs to be. However, on Mac, the finder window is not modal. It is allowing me to click on my application's main window & bring it to the front. Furthermore, clicking on first modal dialog (the one that has the button to launch the finder) does not bring the finder back to the front.

    Has anyone run into this issue before?

  • For me the method works. Which OS X version are you on and which Qt version do you use? And can you provide a simple, small, stripped down but complete sample that demonstrates the behavior?

Log in to reply