首页| 论坛| 消息

标题:为什么mouseMoveEvent会触发paintEvent?
作者:sywh
日期:2014-06-04 14:37
内容:

为什么mouseMoveEvent会触发paintEvent?然后会一直引起重绘,如果我不想让mouseMoveEvent引起重绘,需要怎么处理?


#1 [toby520 06-04 16:22]
不触发paintevent就不要重写它 我想应该不会重绘
#2 [toby520 06-04 16:29]
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.
#3 [_jason 06-19 19:36]
setUpdatesEnabled(TRUE);
update();
setUpdatesEnabled(FALSE);
在需要重绘的时候要这两个函数,update之后会设置为False,其他事件就不会触发重绘了

回复 发表
主题 版块