PDA

View Full Version : keyPressEvent and auto completion



Nyx
24th June 2011, 07:49
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.

Nyx
24th June 2011, 20:09
Any idea of what the setKeepPositionOnInsert should do?

Nyx
25th June 2011, 11:40
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.

Nyx
26th June 2011, 15:07
In fact I don't have any idea how to implement indentation without qscintilla.

Nyx
29th June 2011, 08:34
Could you simply give your idea?

Nyx
7th July 2011, 14:29
I finally achieved to code my "indentor". If someone is interested in it just send me a PM:cool: