Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QFileDialog crashes for existing files [solved]



  • If I select an existing file or I type an existing file name to the input field, the dialog is crashes. Does not react for clicks, does not exiting.
    @ filename = QFileDialog::getSaveFileName(
    this,
    "Save Image",
    "a_" + datetime_string + ".png",
    "image/png (*.png)"
    );@
    What it the problem?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You don't give enough information. What OS are you running ? Which version of Qt are you using ? When exactly does it crash ?

    What does a run through the debugger tell you ?



  • Hi SGaist,
    A clean and rebuild solve the problem. Thanks the reply!


  • Lifetime Qt Champion

    Running on Windows ? :)

    Anyway, nice you found and and thanks for sharing, can you also please update the thread title prepending [solved] so other forum users may know a solution has been found :)



  • No, running on Fedora 18, Qt Creator 2.8.0 based on Qt 4.8.5, QMake version 2.01a. Next time I will update the thread title with [solved] tag immediately.

    Many thanks:)


  • Lifetime Qt Champion

    You're welcome !

    Strange, it's typically the kind of strange crash I have mostly on Windows.

    Anyway, happy coding !


Log in to reply