On some systems, when calling the static method QFileDialog::getExistingDirectory(0, "", "C:/"); or when calling setFileMode(QFileDialog::Directory); and setOption(QFileDialog::ShowDirsOnly); on a dialog before executing/showing it, will make the dialog start appearing but then immediately hang up/freeze when it is required to be shown. Clicking on it makes application crash. There is no way to resume the application once the bugged file dialog is shown.
If using a different path than C:/, it seems to work properly instead.
May be the same bug reported at this link (including a windows-specific, non Qt, workaround), which seems a Windows issue: http://wishmesh.com/2011/06/call-to-openfiledialog-or-savefiledialog-hangs-or-freezes/
This is the original MSDN post: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b79e618b-003d-4d72-bef5-6323164f51dc/showdialog-hangs-when-used-in-script-task-on-vista?forum=sqlintegrationservices
If a QFileDialog with AnyFile file mode is opened/executed at least once before the one which causes the issue, then the "bugged" file dialog does not cause any issues and keeps working correctly.