[PyQt] Qcompleter,dateEdit popup questions.

Andreas Pakulat apaku at gmx.de
Wed Feb 6 09:39:57 GMT 2008


On 06.02.08 11:53:14, Igor Prischepoff wrote:
> Hello,everybody!
> I'm new to PyQt and in process of 
> converting my application from wxPython to PyQt.
> 
> I'd like to ask couple of question about nice QCompleter class in Qt and
> PyQt.
> 
> Question #1:
> How can I build my own custom completer which completes on any char in the
> item word?
> It seems that default Qcompleter completes only if my items starts with
> letters that I've started typing.
> For example: here is my abstract model data:
> 
> Item10
> Item110
> Item20
> Item220
> 
> If I type for example 'm10' then completer should provide only 2 matches
> Item10 Item110 because 'm10' chars is found only in this two items.
> 
> I've read documentation about QCompleter in Qt docs but can not find a clue
> about methods used by Qcompleter when deciding which item from model is
> matched to my typed word.

As far as I can see, what you need to do is to also provide "m10" as an
entry in your completion model.

Andreas

-- 
Your true value depends entirely on what you are compared with.


More information about the PyQt mailing list