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. QGraphicsScene stops updating when application is minimized
Qt 6.11 is out! See what's new in the release blog

QGraphicsScene stops updating when application is minimized

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.2k 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.
  • S Offline
    S Offline
    Steve_Hardingson
    wrote on last edited by
    #1

    Hi,

    I've got an issue in an application that I'm working on where when I minimize my app, the QGraphicsScene stops responding to calls to update - drawBackground never gets called. Even though the app is not being displayed, I do various OpenGL drawings to off screen buffers from drawBackground that need to happen 50 times a second to generate a constant video output. This wasn't an issue in 5.7.0, it's only happening now that I've updated to 5.9.1.

    Is there any way I can force drawBackground to still happen?

    Thanks,

    Steve.

    raven-worxR 1 Reply Last reply
    0
    • S Steve_Hardingson

      Hi,

      I've got an issue in an application that I'm working on where when I minimize my app, the QGraphicsScene stops responding to calls to update - drawBackground never gets called. Even though the app is not being displayed, I do various OpenGL drawings to off screen buffers from drawBackground that need to happen 50 times a second to generate a constant video output. This wasn't an issue in 5.7.0, it's only happening now that I've updated to 5.9.1.

      Is there any way I can force drawBackground to still happen?

      Thanks,

      Steve.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Steve_Hardingson
      did you try to call repaint() instead of update()

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Steve_Hardingson
        wrote on last edited by
        #3

        Yeah, I called repaint on the view, and on view->viewport(), but it didn't have any effect. Is there an equivalent to repaint for QGraphicsScene?

        raven-worxR 1 Reply Last reply
        0
        • S Steve_Hardingson

          Yeah, I called repaint on the view, and on view->viewport(), but it didn't have any effect. Is there an equivalent to repaint for QGraphicsScene?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Steve_Hardingson
          then you will have to decouple your custom painting from Qt's painting events, to keep the background painting running.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          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