Qt-interest Archive, March 2007
QCompleter issue
Message 1 in thread
Hi,
I have little trouble with a QCompleter in conjunction with a
QSqlTableModel. My database has up to 50.000 entries alphabetically
sorted. If I type a word in the QLineEdit with which the completer is
bundled, the completion is only shown if the word is in the initially
loaded items from the database. If the word start with 'e' nothing is
shown because words starting with an 'e' are not in the initially
loaded items.
To achieve that the completer works correct I need to do:
while ( completer->completionModel()->canFetchMore() )
completer->completionModel()->fetchMore();
But that's not the way it should be done. In qcompleter.cpp there is a
TODO for updating the model update. Is this notice also for my
described problem, or make I anything wrong.
Thanks,
Lykurg
--
[ signature omitted ]
Message 2 in thread
Lykurg Nomothet wrote:
> Hi,
>
> I have little trouble with a QCompleter in conjunction with a
> QSqlTableModel. My database has up to 50.000 entries alphabetically
> sorted. If I type a word in the QLineEdit with which the completer is
> bundled, the completion is only shown if the word is in the initially
> loaded items from the database. If the word start with 'e' nothing is
> shown because words starting with an 'e' are not in the initially
> loaded items.
>
> To achieve that the completer works correct I need to do:
>
> while ( completer->completionModel()->canFetchMore() )
> completer->completionModel()->fetchMore();
>
This was a bug in 4.2. Fixed in 4.3 (in a manner very similar to your
patch).
Girish
--
[ signature omitted ]