当前位置: 代码迷 >> QT开发 >> Qt 画图有关问题
  详细解决方案

Qt 画图有关问题

热度:34   发布时间:2016-04-25 04:41:06.0
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.
  相关解决方案