[PyQt] Change in QMouseEvent passed through a signal

Matt Smith melkor at orangepalantir.org
Sun Mar 8 15:04:19 GMT 2009


Okay this is probably more of me getting bit by not using the correct
signatures, but the behavior has changed from my 4.4 installation to my
4.5 (PyQt-x11-gpl-4.5-snapshot-20090304, Ill probably recompile it
today)

when I would pass a mouse event as an emitted signal this worked,

mywidget.emit(QtCore.SIGNAL("mousePressed(QMouseEvent)"),mouse_event)

in 4.5 that doesn't pass the MouseEvent it sorta passes any event, but
this works

mywidget.emit(QtCore.SIGNAL("mousePressed(&QMouseEvent)"),mouse_event)

and of course the connection on other end has the correct signature,
here is a sample too.  The new style works great though especially since
I don't need to know about the '&' bit.

mbs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mouse_test.py
Type: text/x-python
Size: 1584 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090308/f9e7d1c4/mouse_test.py


More information about the PyQt mailing list