this was my submitted bug report: [Issue N255532] using a non-standard method in an example
<qt installation dir>/examples/tools/treemodelcompleter/mainwindow.cpp: highlight member function
it uses completionModel's QAbstractProxyModel interface which is
apparently non-standard and not documented in the class reference.
why an educational example should make use of non-standard methods and
undocumented interfaces?
I received the answer recently:
Basically, the implementation of QCompleter uses a QAbstractProxyModel
subclass to wrap the model, and the writer of the example relied on this
knowledge to write the highlight() function.
Note that the return value of completionModel() is a QAbstractItemModel
pointer purely for generality - it could have been a QAbstractProxyModel
(this would have made things clearer).
I doubt that anyone will change the implementation of this class now, so
we'll go ahead and document the behavior.
Regards,
David
--
David Boddie
Senior Technical Writer
Nokia, Qt Software
Bookmarks