I am writting a javascript code editor with QPlainTextEdit, and now I am workding on code completion with QCompleter.The question is I don't know which string is a variable in the plaintext.I firstly detect the variable according to the keysword,such as
var variable = "something";
class people{};
but it wouldn't work correctly when user paste serveral lines or delete multi lines, or user just delete single character of a exist "variable"
var variabl = "something";
obviously I don't want QCompleter to popup both "variable" and "variabl". any solution ? thanks a lot.