Important: Please read the Qt Code of Conduct -

QGraphicsScene frame rate throttling / coalescing?

  • Say i have a QGraphicsScene with two or more QGraphicsVideoItems that may run at different framerates. maybe one is at 30fps and another is at 30fps, but they're both running on different timers, which may drift a little (assume this is possible even if it's not).

    If i call present() on each item during their timer fire, the scene is going to get 60fps worth of presentations... is it really going to update the scene that fast? the view? are they different? and if i have THREE at that rate, it'll get 90fps worth?

    and what if they're at different framerates? what if one is 30, one is 60, one is at 24... what's the spec for this? i see no doc covering how this should work...


  • Lifetime Qt Champion


    No it won't work like that, one of the reason is your graphics card speed and the other, your screen refresh rate.

    Usually, a graphical toolkit tries to minimize the number of time it has to trigger updates on screen for efficiency reasons. That's why calling update several times won't trigger as much repainting because Qt will try to optimize them.

  • okay cool. but what is the spec? can i expect maximum 60fps and no more? is it documented somewhere?

  • nobody knows the answer to this?

  • Lifetime Qt Champion

    @davecotter said in QGraphicsScene frame rate throttling / coalescing?:

    okay cool. but what is the spec? can i expect maximum 60fps and no more? is it documented somewhere?

    What documentation are you looking for ?
    Current screen refresh rate goes between 60 and 360Hz however the human eyes/brains cannot process images that fast. Then you have the limit of your graphics card and what you are going to make it process and also how you are going to feed it. So it's a bit of a moving target.

  • no, i want to know what the spec is for Qt's refresh rate. if i have a dozen timers each firing separately, possibly at different frequencies, possibly drifting, calling present() whenever they fire, does QGraphicsScene do coalescing? I know that macOS has coalescing but doe Qt?

Log in to reply