[Qt-creator] QCompleter with Regular Expresion
Freddy Martinez Garcia
freddy311082 at gmail.com
Fri Jul 31 21:04:49 CEST 2015
That's will be great, add a QCompleter::RegExpCompletion... if you let me
take a look to your code that's will be great...
regards bro
*============================================="El tamaño de tus logros
depende del tamaño de tus metas." *
*C++ and Qt Senior Developer*
*Lic. Computer Science*
*Buenos Aires, Argentina*
2015-07-31 15:19 GMT-03:00 Tomaz Canabrava <tcanabrava at kde.org>:
>
>
> On Fri, Jul 31, 2015 at 3:09 PM, Freddy Martinez Garcia <
> freddy311082 at gmail.com> wrote:
>
>> I can't use combobox because the lineedit is used for searching...
>>
>
> You can use a QLineEdit and a QListView to get the same effect as the
> QCompleter,
> you need to hook up a few things, of course:
> QLineEdit::textChanged signal should be connected to the
> QSortFilterProxyModel::invalidate
>
> QSortFilterProxyModel should be the model on the QListView
> the show/hide events of the QListView should be deal with and you will
> need a eventFilter to handle the up/down keys to send them to the QListView
> from within the QLineEdit
>
> It's doable ( I have something like this in my particular software if you
> wanna take a look ) - I had to create this because QCompleter doesn't deal
> with QRegExp.
>
> (also, if it's desirable, we could add a new CompletionMode on QCompleter
> - QCompleter::RegExpCompletion )
>
>
>
>> about the QSirtFilterProxyModel, the problems is that QComplet build his
>> own model inside when you give him a model... is what i'm seeing in its
>> behavior...
>>
>> for that is my question
>>
>> regards
>>
>>
>>
>>
>> *============================================="El tamaño de tus logros
>> depende del tamaño de tus metas." *
>>
>> *C++ and Qt Senior Developer*
>>
>> *Lic. Computer Science*
>>
>> *Buenos Aires, Argentina*
>>
>>
>> 2015-07-31 13:29 GMT-03:00 Tomaz Canabrava <tcanabrava at kde.org>:
>>
>>>
>>>
>>> On Fri, Jul 31, 2015 at 1:20 PM, Freddy Martinez Garcia <
>>> freddy311082 at gmail.com> wrote:
>>>
>>>> Hi guys... can I use regular expressions with QCompleter ???
>>>>
>>>
>>> You cant easily do that ( unless you override the model that QCompleter
>>> has ), but you can use a QSortFilterProxyModel and a QComboBox with the
>>> same effect.
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20150731/6a318fa7/attachment.html>
More information about the Qt-creator
mailing list