Can I be notified when a Item has finished repainting?

后端 未结 1 1795
时光说笑
时光说笑 2021-01-22 01:06

I\'m making a snapshot (via a ShaderEffectSource with live: false) of an Item, but I\'m sometimes (1 cases in 200) getting a blank snapshot. I\'m makin

1条回答
  •  野的像风
    2021-01-22 01:33

    As far as I know a Window is always renderd as a whole. So you might use the Window's afterRendering signal.

    The downside: It will be triggered, when ever anything in the window has changed. But combined with the (status == Image.Ready) it might work for you.

    EDIT:
    In a blog post, announcing the release of Qt5.8 the Qt Companies CTO wrote:

    In addition, the scene graph now supports partial updates to the screen if only a small area of the scenography changed. This brings some larger performance improvements to the Qt Quick 2D renderer.

    I don't know the implementation details of the signal afterRendering, so I can't tell whether this is triggered after such a partial update and if so, how to tell, whether that partial update concerned that part, you are interested in.

    0 讨论(0)
提交回复
热议问题