Important: Please read the Qt Code of Conduct -

QFileDialog::getOpenFileNames crashes when clicking on "Desktop"

  • Hi all,
    I'm on Win 7 64 ultimate, Qt 5.5.1 MSVC 2010. I've just stumbled on this:

    QStringList list = QFileDialog::getOpenFileNames(this, tr("Open runs"), m_openPath,
                                                     QString("Runs info (*.bin)"), 0,

    When it is executed, on the left part of the window I get 3 "default locations": Desktop, MaX (this is my Username in Windows) and Documents. If I click on Desktop, it crashes.

    Extra info: my Desktop folder is not located in the usual place (C:\Users\MaX\Desktop) but on another drive (D:\Users\MaX\Desktop). However, the same is true for my Documents folder, and this works fine: when I click on Documents in the dialog it goes to D:\Users\MaX\Documents. But when I click on MaX (the user) it goes to C:\Users\MaX instead of D:\Users\MaX. Maybe that's causing troubles ...

    The native dialog however doesn't have the problem.

  • Additional info: I've found the reason for the crash.
    On my desktop I've a shortcut to a NAS. The NAS is protected with a username/password. If I'm not already logged in on the NAS, the dialog crashes (*) when I click on desktop. If I'm logged in, it works fine. Still a problem though ...

    The other problem stands too: clicking on MaX (the user) it goes to C:\Users\MaX instead of D:\Users\MaX.

    So I seem to have 2 different problems here.

    (*) To be precise, it doesn't crash: it goes into "not responding state" and stays there until I close it (force close).

  • Lifetime Qt Champion


    You should take a look at the bug report system to see if it's something known. If not please consider opening a new report with all your findings, detailed setup and a small compilable example that reproduces the problem.

  • Just for information, this ( is likely not a bug, it was going to C: because my HOME was still on C: (even if the desktop, documents & co were on another drive).

    The other problem (NAS-related) stands though.

Log in to reply