[PyQt] event object type for TabletEnterProximity

buddy+pyqt at nmt.edu buddy+pyqt at nmt.edu
Mon Nov 23 16:54:43 GMT 2009

When I look for the TabletEnterProximity in my application the class for the event
is a regular QEvent rather than a QTabletEvent as is indicated in the documentation.
 I want to get out the pointer type for the event so that I know when the user
changes pointers (say from the stylus to the eraser side).  This is the code I was
using in my class inherited from QApplication:

  def event(self,event):
    if event.type==QEvent.TabletEnterProximity:
    return QApplication.event(self,event)

It produced an exception because pointerType is not a method for a base QEvent object.

Is there something I'm possibly forgetting? and if this is a bug then is there
another way to do what I want?  I want the change to be picked up before the user
presses down with the tablet.  Is there something similar to
QWidget.setMouseTracking so I can get tablet events when no buttons are pressed

B. Becker

More information about the PyQt mailing list