I’m using Python 2.7 with PySide and want to use this to retrieve pen pressure from my wacom pen.
So I tried setting up the following
import PySide
from PySide import QtCore, QtGui
pressure = PySide.QtGui.QTabletEvent.pressure()
print pressure
That threw the following error
pressure = PySide.QtGui.QTabletEvent.pressure()
TypeError: descriptor 'pressure' of 'PySide.QtGui.QTabletEvent' object needs an argument
The object it needs is a “PySide.QtGui.QTabletEvent” Object. But I have no idea how can I retrieve such an object.
So my question is, how do I retrieve the wacom penpressure using QTabletEvent?
You need to receive the actual event and obtain the
pressurefrom it.Example: