[Qt-interest] QPaintEngine setSystemRect should not be changed while engine is active?

Samuel Rødal sroedal at trolltech.com
Tue Jun 30 16:36:51 CEST 2009


Kermit Mei wrote:
> Hello community!
> 
> In my widget, I call update() in a timerEvent(QTimerEvent *event);
> and then call a paint() function in paintEvent(QPaintEvent *event);
> 
> The code is like this:
> 
> void AnimationWidget::timerEvent(QTimerEvent *event) {
>   if(event->timerId() == timerId)
>       update();
> }
> 
> void AnimationWidget::paintEvent(QPaintEvent *event) {
>   if(timerId == 0)
>     Widget::paintEvent(event);
>   else
>     paint(); //Do some paint event
> }
> 
> 
> Rum it, the system tell me:
> 
> QPaintEngine::setSystemRect: Should not be changed while engine is
> active
> 
> How can I solve it? 
> 
> 
> And also another question, if I run the program on ARM (embedded), the
> last step in paint() can't show(). Why?
> 
> Thank you, very much!

How does the paint function look?

--
Samuel



More information about the Qt-interest-old mailing list