On Thu, 07 Apr 2011 12:49:43 +0200, Zoltan Szalai <defaultd...@gmail.com> wrote: > Hi, > > I'm quite sure I'm missing something fundamental here but I can't get > QObject.connect to work as expected when using Qt.UniqueConnection as a > connection type. > I attached some code that demonstrates my problem. I would expect that > the slot is called only once. > > versions: > PyQt4: 4.8.3 > Qt: 4.7.0 > sip: 4.12.1 > python: 2.6.5 > > thx > Zoli
PyQt creates a proxy when a slot is not a Qt slot (ie. not a QObject method decorated with pyqtSlot). A new proxy is created for each connection so, as far as Qt is concerned, the connections in your example are not unique. If you convert your slot, ie. so that it is a method of A and decorated with pyqtSlot, then the second call to connect() will fail. Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt