[PyQt] Use of PyQt_PyObject broken?

Phil Thompson phil at riverbankcomputing.com
Sat Jun 5 15:58:55 BST 2010


On Tue, 1 Jun 2010 15:29:21 +0300, Umit Oztosun <umit at oztosun.net> wrote:
> Hello,
> 
> I have tried latest PyQt (PyQt-win-gpl-snapshot-4.7.4-55d63b517349)
> and Sip (sip-snapshot-4.10.3-de0df36d3162) snapshots on Win32, Python
> 2.5, Qt 4.6.2. However it does not seem possible to use
> "PyQt_PyObject" signal argument type; I am receiving the following
> error:
> 
> "TypeError: type 'PyQt_PyObject' is not supported as a slot argument
type"
> 
> Sample code:
> ===============
> import sys
> from time import time
> from PyQt4.QtCore import *
> 
> class A (QObject):
>     def __init__(self):
>         QObject.__init__(self)
> 
>     def send (self):
>         msg=[1234,"1234",{1:2}]
>         self.emit(SIGNAL("asignal(PyQt_PyObject)"),msg)
> 
>     def receive(self,msg):
>         print msg
> 
> def p(msg): print int(time()-start),msg
> 
> if __name__=="__main__":
>     app=QCoreApplication(sys.argv)
>     a=A()
>     QObject.connect(a,SIGNAL("asignal(PyQt_PyObject)"),a.receive)
>     a.send()
> 
>     sys.exit(app.exec_())
> ===============

Hopefully fixed in tonight's PyQt snapshot.

Thanks,
Phil


More information about the PyQt mailing list