Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, February 2007
QCompleter with more flexible matching + highlighted suggestions


Message 1 in thread

Hello, fellow-Qters!

I am using Qt 4.2.2 on X Windows. I am trying to
create a completion widget which:

1) suggests all completion strings which *contain* the
string entered by the user (as opposed to its default
behavior, in which only strings which *begin* with the
prefix entered by the user are suggested)

and

2) displays some of the suggested completions in bold.

Is 1) achievable by subclassing QAbstractListModel in
the right way, or is the actual matching performed
inside QCompleter?

Is there any chance of doing 2)? If so, how?

Thanks in advance!

Juerg




		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

--
 [ signature omitted ] 

Message 2 in thread

Hi,

Juergen Lemke wrote:
> Hello, fellow-Qters!
> 
> I am using Qt 4.2.2 on X Windows. I am trying to
> create a completion widget which:
> 
> 1) suggests all completion strings which *contain* the
> string entered by the user (as opposed to its default
> behavior, in which only strings which *begin* with the
> prefix entered by the user are suggested)
> 
> and
> 
> 2) displays some of the suggested completions in bold.
> 
> Is 1) achievable by subclassing QAbstractListModel in
> the right way, or is the actual matching performed
> inside QCompleter?
> 

For the items you want bold, return a bold font for Qt::FontRole in your 
model.

Girish

--
 [ signature omitted ]