[Interest] Replacing QPlainTextEdit standard shortcuts

John Weeks john at wavemetrics.com
Mon May 6 20:03:30 CEST 2013

On 05-May-2013, at 10:18 PM, Wilhelm wrote:

> Looking for a solution I ended overwriting QPlainTextEdit::keyPressEvent(), but I think this is the wrong way?

That's what we do. Actually, to be precise, we handle key press events in an evenFilter function in the widget that contains our QPlainTextEdit widget. That's sort of a minor detail.

We do that to handle up and down arrows, home and end keys and such that do special things in our application. QPlainTextEdit() handles shortcuts by looking for key press events, so as far as I can tell that's the only way you can do it.

-John Weeks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130506/38cd6294/attachment.html>

More information about the Interest mailing list