PyQt - clear widget for redraw

Diez B. Roggisch deetsNOSPAM at web.de
Mon Aug 2 11:57:06 EDT 2004


> What I'm drawing is a series of lines (like a horizontal bar chart) and it
> is updated several times a second.  The problem is that it goes too fast.
> I tried the time.sleep() function, but then it doesn't draw properly.  It
> seems to draw only part of the chart each time, and flickers.
> 

Usually there is no "to fast" in graphics - so I've got to admit I'm not
sure what you are talking about.

Where does the data to draw come from, and how fast is it actually coming? A
flickering sensation usually stems from the redrawing done so fast it
interfers with the vertical retrace. 

Maybe it helps to put your sleep not in the drawing code, but between the
arrival of different data sets to draw, thus limiting the redraws to an
amount of lets say 10/s.

If you'd fill us in with some more details, the suggestions might be better.
And I think it would be worth asking these qustions on the PyKDE list Jim
has mentioned - I'm also there :)
 
-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list