QCompleter model filtering
I am using a tree model implementation of QAbstractItemModel to hold function names read in from a file. Each child of the root node has a function name held as it's data item and if the function has a class, the class name is also held in the model. The reason I have done this is so that I can (in theory) filter the QCompleter popup according to the class that is being used. This is all being used to provide code completion for languages as yous can probably guess.
//This is the front end using the coding language of choice
myObj = myClass()
After the '.' is entered, I want the model to filter to the functions that are part of the class that MyObj is. I have been reading the documentation but am unable to find anything suitable for QCompleter for filtering based on something as custom as this. Any help would be much appreciated.
Can anyone help with this?
Could I possibly use a separate proxy model to filter the source tree model? Has anyone ever tried this?