[PyQt] PyQt

Peter Shinners pshinners at blizzard.com
Thu Mar 6 00:12:46 GMT 2008

> I'm using a QTimer  to call a paintEvent update()  that polls the
> joystick in the main class (Keyboard). However there's some other
> drawing i want to do when the joystick is polled. However the
> drawing is supposed to be done by a different class with its own
> graphics etc (called Ring)

I know this isn't the main point of your questions. But the "paintEvent"
Function you are overriding should only deal with painting. It doesn't
Clean to be polling hardwhere during this call.

It sounds like the best plan is to create your own method to handle
polling the hardware. You can then tell the widget to update if anything
has changed.

Using the QTimer is the right approach, just have it call your own 
function that does something like this.

def myTimerCallback(self):

More information about the PyQt mailing list