[PySide] New Style Signal/Slot
Tim Doty
thoromyr at mac.com
Tue Jul 17 20:30:41 CEST 2012
thank you very much for both responses! That clarifies things for me.
Now, back to coding :)
Tim Doty
On Jul 17, 2012, at 7:54 AM, Aaron Richiger wrote:
> Hello Tim, me again... I just changed your code to make it working. It's
> shorter and therefore cleaner to understand but less interactive:-)! The
> key point is, that you have to define your signal in a subclass of
> QObject. The rest is mainly the same as you coded before...
>
> #######################################
>
> from PySide.QtCore import *
>
> def someSlot():
> print 'test slot called'
>
> class TestSignal(QObject):
> someSignal = Signal()
>
> t = TestSignal()
> t.someSignal.connect(someSlot)
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside
More information about the PySide
mailing list