Important: Please read the Qt Code of Conduct -

Increase in memory usage while using FileDialog qml

  • Hi,
    We have an application which opens FileDialog on a button click. we are using qml's FileDialog. When we show the FileDialog and closing it by selecting cancel button, we see an increased memory around 1.2MB (in taskmanager) . When we open FileDialog multiple times, the memory is keep going on increasing by 1.2 MB. is it a memory leak?


  • Lifetime Qt Champion


    Please provide the version of Qt you are using, the platform and compiler version.

    A minimal compilable example showing what is happening would be great.

  • Hi,
    I tested this on Windows Desktop Qt 5.7.1 minGW 32 bit

    Here is the code i tested with

    import QtQuick 2.7
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.0
    import QtQuick.Dialogs 1.2
    ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
            onAccepted: {
            onRejected: {
        Button {
            id: button
            x: 270
            y: 209
            text: qsTr("Button")
        Connections {
            target: button
            onClicked: {
                testFileDialog.visible = true


  • Lifetime Qt Champion

    Then you should first test on a more recent version. Qt is currently at 5.9.1.

Log in to reply