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

List:       pykde
Subject:    Re: [PyQt] Reasign event
From:       "Hans-Peter Jansen" <hpj () urpla ! net>
Date:       2011-05-20 8:27:20
Message-ID: 201105201027.20516.hpj () urpla ! net
[Download RAW message or body]

On Friday 20 May 2011, 01:46:36 Hugo Leveille wrote:
> Ok
>
> So for my exemple,what would be the correct syntax
>
>
> thanks alot
>
>
> --
> Hugo Leveille
> Compositing TD
> Vision Globale
> hugol@fastmail.net
>
> Sent from my iPhone

Send me one over, and we're fine ;-)

> On May 19, 2011, at 7:30 PM, "Hans-Peter Jansen" <hpj@urpla.net> 
wrote:
> > On Friday 20 May 2011, 00:12:14 Hugo Léveillé wrote:
> >> Newbie in using event in pyqt
> >>
> >> Let say I just want a keyPressEvent to happen with a certain
> >> QLineEdit
> >>
> >> I tried :
> >>
> >> self.myLineEDit.keyPressEvent = self.myEvent
> >>
> >> def myEvent(self,event):
> >>    print "Hello world"

        QtGui.QLineEdit.keyPressEvent(self, event)

> >>
> >> Sure enought its working. Now it only print hello world when I am
> >> typing in that line edit. But the problem is that the text I am
> >> typing does not appear in the line edit. Only the printing of
> >> "Hello world" happend
> >>
> >> What am I missing ?
> >
> > Calling the base class. You're disrupting the event handler chain.

Pete
_______________________________________________
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