PDA

View Full Version : QPainter and complex drawing : advices



toutarrive
18th November 2009, 10:51
Hello,

For a custom window, i override the paint event of the widget for the drawing.
The drawing itsef include around 200 line of codes.

I've got two solutions:
- execute the drawing code directly in the paint event function.
- execute the drawing code in a fonction called from the paint event.

I've read that for complex drawing it is adviced to use the second solution. I would like to know what are the reasons for that.

What are the advantages and drawbacks of each solution?

Cheers