[SailfishDevel] QtContacts & jolla-contacts app

Michał muki at mkiol.net
Wed Oct 28 11:48:21 UTC 2015


Hi,

I'm struggling with an issue related to QtContacts API and 
jolla-contacts app.

Using QtContacts, I can get, update or create new contact. It works as 
expected, so my app is able to access phone's contacts. The issue I have 
is when I create new contact via QtContacts, this contact is not visible 
in jolla-contacts app. I "see" this new contact via QtContacts in the 
same way how I "see" other contacts, but for some reason, I can't see 
contacts created with QtContacts API in jolla-contacts.

Any idea what could be wrong?

<code>

QContactManager cm = new QContactManager();

QContactDisplayLabel label;
label.setLabel("Test Contact");

QContactName name;
name.setFirstName("Test");
name.setLastName("Contact");

QContactPhoneNumber number;
number.setNumber("111-111-111");

QContact contact;
contact.saveDetail(&label);
contact.saveDetail(&name);
contact.saveDetail(&number);

cm->saveContact(&contact));

</code>

-- 
Michal



More information about the Devel mailing list