Disable overritten shortcuts in QTextEdit
-
Hi,
What action are you going to replace the past shortcut with ?
Depending on that, you should take into account that you are going against what people are used to and expect from that shortcut. Especially in a text related widget.
-
Take a look at the documentation of QTextEdit::paste. It's likely the starting point you are looking for.
-
Incomplete type errors mean that you are missing the include of the corresponding class.
-
I use function keyPressEvent, to uppercase first letter in each sentence , but this cause that if textEdit is empty, pasting by Ctrl+V doesn't work. If I type sth, even space, all works correctly. I created own function paste, and call out it always works(by action in menu), even on the beginning of document. This function has also shortcut Ctrl+V, but is hidden by function paste implemented in QTextEdit and I can't use it by Ctrl+V. Maybe the better way is solve a collision of keyPressEvent and using shortcuts?