[PyKDE] sender() in PyQt4 returns wrong object

Phil Thompson phil at riverbankcomputing.co.uk
Tue Feb 21 17:20:25 GMT 2006


On Tuesday 21 February 2006 4:14 pm, Andreas Pakulat wrote:
> On 21.02.06 15:31:29, Phil Thompson wrote:
> > On Tuesday 31 January 2006 11:41 pm, Andreas Pakulat wrote:
> > > Hi,
> > >
> > > I tried to use sender() in a slot connected to a signal of a QWidget
> > > derived class, however sender() always returns a QObject instance
> > > instead of the original QWidget-derived one.
> > >
> > > Is this by purpose and thus sender() is practically not usable in PyQt4
> > > or am I just missing something?
> >
> > If this is still a problem can you send me a test case?
>
> See attached file, sender() works for a QPushButton but not for the
> QWidget derived class.

Thanks - fixed in tonight's snapshot.

Phil




More information about the PyQt mailing list