PDA

View Full Version : Disable Return on QTextEdit



raphaelf
16th May 2007, 09:46
Hi everybody,

OS:WINXP
QT 4.1.3

I would like to disable a return press on my textedit. Is that possible?

Thanks :o

Teerayoot
16th May 2007, 09:53
possible
just reimplement virtual void keyPressEvent(QKeyEvent *);

and ignore message when return key press.

wysota
16th May 2007, 09:54
You can apply an event filter or reimplement event or key press event and filter out return presses.

raphaelf
23rd May 2007, 08:04
thanks wysota, i will try :p