[Qt-interest] narrowing down list in QListView w/ autocompletion in realtime
Andre Somers
andre at familiesomers.nl
Sun Jul 10 20:47:17 CEST 2011
Op 10-7-2011 20:20, Matthias Dahl schreef:
> Hi everyone.
>
> I'm currently working on a small project for a friend of mine and basically need
> a QListView which displays all words stored in a sqlite db to navigate through.
> The list should be narrowed down in "realtime" by typing parts or the whole word
> in a QLineEdit (or similar).
>
> Setting up QLineEdit w/ QCompleter is a peace of cake and works nicely. Yet I am
> unable to find the right way to get the trio QLineEdit, QCompleter and QListView
> to work together as desired (see above).
>
> Is there a standard way to do this that I am too blind to see or is this usecase
> not directly supported and I have to derive from QListView and add the missing
> pieces?
>
> Thanks a lot in advance for any hints or tipps...
>
Did you look into using a QSortFilterProxyModel between your model and
your view?
André
More information about the Qt-interest-old
mailing list