How to grab a qwidget /render it in a pixmap everytime it needs to be repainted?

前端 未结 3 1212
我在风中等你
我在风中等你 2021-01-06 03:27

I have a QWidget that I don\'t want to show on screen. Instead I want to get a pixmap of the widget every time it is repainted, in order to send it to another part of the ap

3条回答
  •  暖寄归人
    2021-01-06 03:51

    Well I found a solution. I took all the content of the widget that I wanted to grab, and placed it inside a Frame. Then I grabbed the Frame. It's not really elegant but it works.

提交回复
热议问题