Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Clearing a layout gets progressively slower?

Clearing a layout gets progressively slower?

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 3 Posters 437 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.
  • S Offline
    S Offline
    sam1
    wrote on last edited by
    #1
    This post is deleted!
    JonBJ 1 Reply Last reply
    0
    • S sam1

      This post is deleted!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @sam1
      I don't know if this right/relevant to whatever your slowness is about.

      I'm not sure in Python you are deleting as much as you need to. I think you want an item.deleteLater() too. I'm basing this on https://stackoverflow.com/a/28940138/489865. That one is simple looking, you should also look at the other answers there, and comments.

      Don't forget you must let the code back to the event loop if you've gone deleteLater(), but you're probably doing that.

      Otherwise, where exactly do you mean you get the slowness?

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

        Hi,

        If you want to nuke everything every time, wouldn't it be simpler to have a "container" widget that you delete and replace with a new one.

        In any case, can you explain the motivation behind removing everything like you do ?

        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