Answer the question
In order to leave comments, you need to log in
How to track enter presses in qtextedit?
It is necessary when you press enter and focus on the input field, some kind of action occurs, I did it through the eventFilter, but the text is entered very slowly.
def eventFilter(self, obj, event):
if event.type() == QtCore.QEvent.Type.KeyPress:
if event.key() == QtCore.Qt.Key.Key_Return:
print('Enter pressed')
return True
return False
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question