[PyQt] QScintilla code-completion bizarre behavior
Baz Walter
bazwal at ftml.net
Tue Sep 23 01:25:19 BST 2008
Brian Kelley wrote:
[snip]
> def start(self):
> lexer = self.lexer = QsciLexerPython()
> api = QsciAPIs(lexer)
>
> # write the API to a file
> self.api = api
you save references to your lexer and api here
[snip]
> def finished(self):
> # save the api to a binary file
> self.api.savePrepared("test.prepared")
>
> # Shows how to use the prepared API inside Scintilla with a prettier
> # Python Mode
> editor = self.editor = QsciScintilla()
> editor.show()
> lexer = QsciLexerPython()
> api = QsciAPIs(lexer)
then (bizarrely) create a new lexer and api here
[snip]
> # uncommenting this exception causes code-completion not to work.
> raise Exception("Why does this exception make code-completion work?")
my guess is that if you hook self.editor up to self.lexer and self.api
it will all work fine
-
Regards
Baz Walter
More information about the PyQt
mailing list