读书人

Qt 画图有关问题

发布时间: 2012-08-03 00:12:14 作者: rapoo

Qt 画图问题
比如说

C/C++ code
void A::paintEvent(QPaintEvent *)  {           QPainter p(this);     ...}

这玩意怎么调用的?

[解决办法]
当你使用update()或者repaint()函数时会自动调用,另assistant 助手你不用吗?:
This event handler can be reimplemented in a subclass to receive paint events passed in event.

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.

读书人网 >QT开发

热点推荐