[PyQt] Filter mouse move event

Luca Fasano lucafasano at interfree.it
Sat Apr 4 19:07:35 BST 2009

Hi list,
I need to filter mouse moving event on a QGraphicsView. I created a 
filter and install it to a QGraphicsView instance, but desired event 
seems not to be captured.
Filter definition is:

class Filter(QtCore.QObject):
	def eventFilter(self, obj, event):
    	print event.type()
    	return False

then I have installed an instance of this filter to graphicsview as 

	self.graphicsview = QtGui.QGraphicsView(self.scene, self)
    	self.filter = Filter(self.graphicsview)

...but event seems not to be captured! Where I'm wrong??

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3261 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090404/b0b197fe/smime.bin

More information about the PyQt mailing list