I made a QLineEdit
for reading an infix maths expression. Operators are limited to the +-*/
and brackets. Values can be numeric or a variable name representing a numeric value. I want to autocomplete for variable names.
The problem is that apparently simple QComplete
only works for single pre-defined words/phrases. They don't work in between other words (As you might expect to do when modifying an expression).
I tried reading the Tree Model Completer, but since I'm programming in Python that wasn't too helpful to me. Does anyone know of a simple Tree Model Completer example coded in python?