[QScintilla] Ctrl+Space and Autocomplete

Baz Walter bazwal at ftml.net
Thu Dec 16 00:15:35 GMT 2010


On 14/12/10 16:06, Roberto Gerson wrote:
> Hi everyone,
>
> I'm new using QScintilla and I already have the most recent source code
> compiled and working.
>
> Well, I'm creating  a Text Editor for NCL (http://www.ncl.org.br) and I want
> to use autocomplete features. I already can autocomplete some words when I
> start to write them. Additionally, I would like to use Ctrl+Space to enable
> autocomplete. But I have no idea how to do this. Today, when I press Ctrl +
> Space, QScintilla add "NULL" to my text.
>
> Does Anyone know how to to this ?

QScintilla has no default key binding for ctrl+space, so it will output 
whatever text (if any) is associated with that key combination - which 
on your platform happens to be the control character NUL.

to associate a different behaviour with that key combination, you could 
simply create a QShortcut for it and connect it to an appropriate signal 
handler.

to invoke auto-completion, use one of QScintilla's autoCompleteFrom* 
methods.


More information about the QScintilla mailing list