[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] problem with passing tuple with pyqt4 signal/slot mechanism
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2007-04-26 15:03:41
Message-ID: 200704261603.41985.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Thursday 26 April 2007 3:35 pm, Andreas Pakulat wrote:
> On 26.04.07 19:39:30, Pradnyesh Sawant wrote:
> > Hello,
> > I have a pyqt4 code in which i'm trying the signal/slot mechanism. The
> > (stripped) code is as follows:
> >
> > class D(QtCore.QThread):
> >    def __init__(self):
> >        QtCore.QThread.__init__(self)
> >        tpl = ("Primary", "priSec")
> >        print "tpl:", tpl
> >        self.emit(QtCore.SIGNAL("setLabel"), tpl)
> >    QtCore.QObject.connect(d, QtCore.SIGNAL("setLabel"),
> >            dialog.setLabel, QtCore.Qt.QueuedConnection)
> >    sys.exit(dialog.exec_())
> >
> > Can anyone kindly tell me what's happening here?
>
> You have to say which arguments your signal transports, i.e. use
> SIGNAL("setLabel(PyObject*)") in both cases. Else your argument will
> just be dropped.

That's not necessary. Missing out the parenthesis has the same effect.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic