nivel
12th June 2009, 22:15
Hello everyone,
I am writing a simple text editor based on QTextEdit with autocompletion functionality for which I am using QCompleter. What I want to achieve is that the list of suggestions will be created based on the previous word entered by the user (i.e. due to grammar or syntax). The problem that I just can't overcome is how to obtain that "previous word"? I just want to be somehow able to access the word before the prefix being entered and before the space separating the two words. Can anyone provide any hint for achieving this? Thanks for any help!
I am writing a simple text editor based on QTextEdit with autocompletion functionality for which I am using QCompleter. What I want to achieve is that the list of suggestions will be created based on the previous word entered by the user (i.e. due to grammar or syntax). The problem that I just can't overcome is how to obtain that "previous word"? I just want to be somehow able to access the word before the prefix being entered and before the space separating the two words. Can anyone provide any hint for achieving this? Thanks for any help!