[Qt-interest] QPlainTextEdit Ctrl+K shortcut under Windows
Roland Krause
rokrau at yahoo.com
Mon Jan 4 20:44:05 CET 2010
I understand that the Ctrl+K shortcut has been removed under Windows sometime since Qt-4.5.x .
What is the easiest way to re-add it? I understand that there is a QKeySequence class that defines a
StandardKey (Ctrl+K) for DeleteEndOfLine for Linux but not for Linux or MacOSX.
On the other hand there is no slot or function that is callable for QPlainTextEdit or QTextCursor that can be
connected to a custom QAction. The implementation of QPlainTextEdit uses its event filter to implement
DeleteEndOfLine.
What do I need to do, create a QShortCut(QKeySequence::DeleteEndOfLine,parent)
and call setKey("Ctrl+K") on it?
Could someone please enlighten me a bit as to what I need to so that "Ctrl+K" deletes the end of the current line under
Windows. (-: Short of reimplementing the whole thing please :-)
Thanks
Roland
More information about the Qt-interest-old
mailing list