keyPressEvent and auto completion
Hello,
I'm trying to do an auto completer for parenthesis but when I insert ")" in my QPlainText while "(" key is pressed I get ")(" instead of "()". That 's propably because the inserted text is written before the pressed key. How could I do?
Tanks for your help.
PS: I don't want to use keyReleaseEvent because this is lagging to much.
Re: keyPressEvent and auto completion
Any idea of what the setKeepPositionOnInsert should do?
Re: keyPressEvent and auto completion
I thought of using scintilla in my qplaintextedit but I wonder if it's possible? I saw the qsciscintillabase doc and it says that low level API are implemented on it.
Re: keyPressEvent and auto completion
In fact I don't have any idea how to implement indentation without qscintilla.
Re: keyPressEvent and auto completion
Could you simply give your idea?
Re: keyPressEvent and auto completion
I finally achieved to code my "indentor". If someone is interested in it just send me a PM:cool: