void QWidget::update ()分析重绘事件激活
2011-05-26 08:56
260 查看
void QWidget::update ()分析重绘事件激活 1看看手册中这段话
void QWidget::update () [slot]
Updates the widget unless updates are disabled or the widget is hidden.
This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to repaint() does.
Calling update() several times normally results in just one paintEvent() call.
Qt normally erases the widget's area before the paintEvent() call. If the WRepaintNoErase widget flag is set, the widget is responsible for painting all its pixels itself.
See also repaint(), paintEvent(), updatesEnabled, erase(), and setWFlags().
2.update() 激发Paint Event 事件的发生,而Paint Event 时间将调用QWidegt::PaintEvent(QPaintEvent paint)
而这个Protected函数是定义窗口自己的绘制特性。
3.void QWidget::update () [槽]
更新窗口部件,除非更新已经失效或者窗口部件被隐藏。
这个函数不会导致一个立刻的重新绘制——更正确的是,当Qt回到主事件回路中时,它规划了所要处理的绘制事件。这样允许Qt来优化得到比调用repaint()更快的速度和更少的闪烁。
几次调用update()的结果通常仅仅是一次paintEvent()调用。
Qt通常在paintEvent()调用之前擦除这个窗口部件的区域。仅仅只有在WRepaintNoErase窗口部件标记被设置的时候,窗口部件本身对绘制它所有的像素负有责任。
void QWidget::update () [slot]
Updates the widget unless updates are disabled or the widget is hidden.
This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to repaint() does.
Calling update() several times normally results in just one paintEvent() call.
Qt normally erases the widget's area before the paintEvent() call. If the WRepaintNoErase widget flag is set, the widget is responsible for painting all its pixels itself.
See also repaint(), paintEvent(), updatesEnabled, erase(), and setWFlags().
2.update() 激发Paint Event 事件的发生,而Paint Event 时间将调用QWidegt::PaintEvent(QPaintEvent paint)
而这个Protected函数是定义窗口自己的绘制特性。
3.void QWidget::update () [槽]
更新窗口部件,除非更新已经失效或者窗口部件被隐藏。
这个函数不会导致一个立刻的重新绘制——更正确的是,当Qt回到主事件回路中时,它规划了所要处理的绘制事件。这样允许Qt来优化得到比调用repaint()更快的速度和更少的闪烁。
几次调用update()的结果通常仅仅是一次paintEvent()调用。
Qt通常在paintEvent()调用之前擦除这个窗口部件的区域。仅仅只有在WRepaintNoErase窗口部件标记被设置的时候,窗口部件本身对绘制它所有的像素负有责任。
相关文章推荐
- libevent源码分析之事件激活
- BOM添加Item的UpdateTable事件与性能分析
- libevent源码分析(10)--2.1.8--事件激活
- STM32F4库函数里面的RCC_DeInit(void)函数分析
- View相关属性分析与处理按键事件
- SCN HeadRoom 事件分析
- 理性分析百度封杀淘宝客事件
- Guava 源码分析(Cache 原理 对象引用、事件回调)
- Android Activity 触摸屏事件派发机制和源码分析
- input 输入框内的输入事件详细分析
- Redis源代码分析(二十)--- ae事件驱动
- 图片中添加点击事件后没有反应的问题分析
- libevent源码分析(9)--2.1.8--事件注册和删除
- jquery事件绑定和激活
- ORACLE UPDATE 语句语法与性能分析的一点看法
- libevent2.0分析:事件循环的一生
- RCU(Read-Copy Update)synchronize原理分析
- Android输入事件流程中的EventHub分析及源码演示
- Android系统Recovery工作原理之使用update.zip升级过程分析(五)---update.zip包从上层进入Recovery服务
- Android中Preference的使用以及监听事件分析