I want to add new line in the given cursor position in QTextEdit. I tried what's below.
Here new line is added to the end:
self.textEdit.moveCursor(QTextCursor.PreviousWord)
self.textEdit.moveCursor(QTextCursor.PreviousWord)
self.textEdit.append()
This has no effects at all:
self.textEdit.moveCursor(QTextCursor.PreviousWord)
self.textEdit.moveCursor(QTextCursor.PreviousWord)
self.textEdit.insertHtml('<br>')