Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Increase in memory usage while using FileDialog qml
Qt 6.11 is out! See what's new in the release blog

Increase in memory usage while using FileDialog qml

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tirupathi Korla
    wrote on last edited by
    #1

    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?

    -Tirupathi

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tirupathi Korla
        wrote on last edited by
        #3

        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")
            FileDialog{
                id:testFileDialog
                onAccepted: {
                    console.log("accepted")
                }
                onRejected: {
                    console.log("rejected")
                    testFileDialog.close()
                }
        
            }
        
            Button {
                id: button
                x: 270
                y: 209
                text: qsTr("Button")
            }
        
            Connections {
                target: button
                onClicked: {
        
                    print("clicked")
                    testFileDialog.visible = true
                }
            }
        }
        
        

        -Tirupathi

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved