Qt Painter outside paintEvent - impossible - workaround?

前端 未结 4 2003
走了就别回头了
走了就别回头了 2020-12-22 02:27

So it appears that Qt4 doesn\'t let you draw on windows outside of a paint event. I have a lot of code that expects to be able to in order to draw rubber band lines (generi

4条回答
  •  無奈伤痛
    2020-12-22 03:03

    Just paint to a QPixmap, and copy it to the real widget in the paintEvent. This is the only standard way. You shouldn't try to workaround it.

提交回复
热议问题