view的painevent()接口不停地被调用,什么原因,怎么处理呢?

在UI窗口没有任何改动的情况下,view的painevent()接口不停地被调用,导致UI窗口不停地被重绘,最终导致真正要操作UI的时候很卡(比如拖动边框等)

检查你的代码哪里是否反复调用repaint()update()

From Qt Documentation

A paint event is a request to repaint all or part of a widget. It can happen for one of the following reasons:

  • repaint() or update() was invoked,
  • the widget was obscured and has now been uncovered, or
  • many other reasons.