I have a QPushButton on a modal dialog which, when clicked, calls QFileDialog::getOpenFileName(NULL, "Open File");. This presents a native Open File dialog.
When the native Open File dialog is closed (either by clicking the OK or Cancel button), the Qt application is deactivated.
You can reproduce this using the attached simplified example. Build and run the application and click the "Show Open File Dialog" button. Click OK or Cancel to close the file dialog. Notice that the application is deactivated. If you have another window in the same position (eg. Qt Creator), that application is activated and covers up the Qt example application.
If you click the "Show Print Dialog" button in the example, the native Print dialog is opened. Clicking Close on this dialog does not result in the buggy behavior.
In Qt 4.8.5, I do not see the bug, but it's present in Qt 5.2.0.
I get this bug using Windows 7 but not using Macintosh 10.6.8.