[PyQt] Use of PyQt_PyObject broken?

Umit Oztosun umit at oztosun.net
Tue Jun 1 13:29:21 BST 2010


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_())
===============

Regards,
--
Umit


More information about the PyQt mailing list