event object type for TabletEnterProximity

View: New views
2 Messages — Rating Filter:   Alert me  

event object type for TabletEnterProximity

by buddy+pyqt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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:
      checkForNewPointerType(event.pointerType())
    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
down?

Thanks,
B. Becker

_______________________________________________
PyQt mailing list    PyQt@...
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: event object type for TabletEnterProximity

by Phil Thompson-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 23 Nov 2009 09:54:43 -0700 (MST), buddy+pyqt@... wrote:

> 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:
>       checkForNewPointerType(event.pointerType())
>     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
> down?

Support for some event sub-classes was missing - fixed in tonight's
snapshot.

Thanks,
Phil
_______________________________________________
PyQt mailing list    PyQt@...
http://www.riverbankcomputing.com/mailman/listinfo/pyqt