Register Login

How to add a KindFilter to a ContactPicker in QML?

Views: 500 Replies: 1
Hi. I am new at Native programming, and am trying to set up a ContactPicker.

The control works well enough, but I am trying to add a filter to only get contacts that have an email address, and it does not seem to work:

ContactPicker {

id: emailPicker

kindFilters: KindFilters.Email
carock
Asked: 22:27 02/07/2016
geesh 22:27 02/07/2016
0
Can this property be set in QML? If so, what is the syntax?No, because if you look at the docs for ContactPicker (properties index) you'll notice that it is not listed as a property at all. You'd have to call the Code: setKindFilters(const QSet< bb:im::contacts::AttributeKind::Type> &kindFilters) method, but that would be rather difficult from QML.

The first two options that spring to mind for me are:

    Subclass ContactPicker as EmailContactPicker and preset the kind, or subclass and add your own properties.Construct an instance of ContactPicker with preset kind and pass it in to the QML as a context variable.

The first can be made as flexible and complicated as you like. The second is messy and maybe more trouble than it's worth.

How to add a KindFilter to a ContactPicker in QML?

Similar questions

Blackberry Priv - how to add a conference call with dial in # to the Calendar App

I'm new to the Priv and am trying to figure out how to make setting up meetings easy I can't find an easy repeatable way to arrange for conference ...

BlackBerry Priv - how do I add a conference call with the dial in # to the Calendar App?

I'm new to the Priv and am trying to figure out how to make setting up meetings easy I can't find an easy repeatable way to arrange for conference ...

how to download a browser in a BB Storm without phone or internet service

I am trying to use a Storm 9530 for wifi uses and picture and music and file storage usage but I don't want phone or data services My Storm has no ...

Anyone know how to create a task LIST in tasks (new BB Priv)???

Finally took the plunge and picked up a couple Privs for my business last week Going from Z10's Moving everything over went pretty straightforward ...

how to install a ringtone in blackberry classic

how do I install a ringtone in blackberry classic ...

how do I add multiple contacts or a distribution list at once to BBM contacts?

I just want to add multiple people to my BBM at once I don't want to add each person one at a time I have 50 colleagues who all need to be connected ...

How do I reply to create a new text message in a work-wide app?

How does one create a new text message that has no thread in the work wide double screen app for passport? ...

how to add a logo on my email signature

the logo should be part of the signature and not show up as an attachment ...

How to disconnect the a-gps in a q5 bb??

Hello The gps in my q5 gives me the wrong location most of the time when connected to the mobile net and data services If I disconnect both of them ...

how do I add a photo to a contact on the priv

I want to put a photo with my contacts on my priv ...