[Interest] Replacing QPlainTextEdit standard shortcuts

Wilhelm wilhelm.meier at fh-kl.de
Mon May 6 07:18:23 CEST 2013


Hi,

what is the "right way" to replace a standard shortcuts (e.g. 
Shift+Delete) in QPlainTextEdit. I tried to define an action with this 
shortcut (see attached example), but this only works for non-standard 
shortcuts (like Ctrl+Delete). For Shift+Delete (shortcut for "cut") this 
doesn't trigger the action.

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

Any hints?

-- 
Wilhelm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cc
Type: text/x-c++src
Size: 176 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130506/00f8061c/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.cc
Type: text/x-c++src
Size: 724 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130506/00f8061c/attachment-0001.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.h
Type: text/x-chdr
Size: 314 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130506/00f8061c/attachment.h>


More information about the Interest mailing list