[PyQt] Keypressevent

2010-09-08 Thread lucabe...@libero.it
hello i need to intercept the return and the enter key in a plaintextedit and i have write this def keyPressEvent(self, event): self.plainTextEdit.keyPressEvent(event) if event.key() == QtCore.Qt.Key_Return : print ' return' elif event.key() ==

Re: [PyQt] Keypressevent

2010-09-08 Thread Vincent Vande Vyvre
Le 08/09/10 11:06, lucabe...@libero.it a crit: hello i need to intercept the return and the enter key in a plaintextedit and i have write this def keyPressEvent(self, event): self.plainTextEdit.keyPressEvent(event) if event.key() == QtCore.Qt.Key_Return :

Re: [PyQt] Keypressevent

2010-09-08 Thread Hans-Peter Jansen
[Resend to list also] On Wednesday 08 September 2010, 11:06:59 lucabe...@libero.it wrote: hello i need to intercept the return and the enter key in a plaintextedit and i have write this def keyPressEvent(self, event): self.plainTextEdit.keyPressEvent(event) if event.key() ==

[PyQt] keyPressEvent

2009-06-06 Thread \Q\
hello, i'm a pyqt noob... I have 2 QTableView (tView1 an tView2) on a QMainWindow ,What i need is to know how to find the 'sender' of a keyPressEvent that i have received on a QMainWindow , in my specific situation, if the event is by tView1 or tView2: code [...] class MainWindow(QMainWindow,