Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. App freezes when unloading screen containing many components

App freezes when unloading screen containing many components

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.5k 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.
  • Q Offline
    Q Offline
    QtQueries
    wrote on last edited by
    #1

    Hi

    I've done a couple of QML apps now, and both contain screens which need a large number of components added to them at runtime.

    I add these components in a loop, using Qt.createComponent() and Component.createObject(). I use this to add anywhere between 50 and 200 components.

    The problem comes when it's time to unload the screen. When the screen disappears, and the new one is loaded in, the app freezes for a few seconds. The more components that were added to the screen, the worse this gets.

    I guess this is due to the system disposing of all the objects that were created.

    The handset seems to freeze completely at this time, not accepting any touches, and not updating the screen at all. We also get no notice about when the cleanup process has finished.

    Other than keeping these components loaded in memory at all times (risking us going out of memory at some other point), is there any way to get round this problem?

    Thanks

    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