Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Memory vs effiency of QStackedWidget
Forum Update on Tuesday, May 27th 2025

Memory vs effiency of QStackedWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
qstackedwidgetmemoryspeed
2 Posts 2 Posters 434 Views 2 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.
  • A Offline
    A Offline
    arjun98
    wrote on last edited by
    #1

    I noticed that when creating a multi page application with a stacked widget all "pages" are initialized, thus loaded into memory. How does this affect the overall memory usage?
    Is a setup us where upon a signal, like a button click, a series of widgets are destroyed and a new series are created/initialized to create a new page efficient?
    Any sources for discussion on this topic would be appreciated as well.
    Thank you,
    Arjun

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

      Hi,

      This will depend on your widgets and what their content. It will also depend on the device that runs your application. But more seriously, unless you are under very high memory constraints you should allocate the widgets commonly used from the start and the ones that are less often used when they are needed.

      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
      1

      • Login

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