i use this code and getting contact details of only one person ....
contactManager = new QContactManager();
QList<QContact> contacts = contactManager->contacts();
contacts.detail(QContactPhoneNumber::DefinitionName).value(QContactPhoneNumber::FieldNumber);
QContact a = contactManager->contact(contacts.count());
QContactPhoneNumber no = a.detail<QContactPhoneNumber>();
qDebug() << "Name:" << a.displayLabel() << "Number:" << " " << no.number() ;
UserId = a.displayLabel();
PhoneNumber = no.number();
output:
Name: andrew Number: +7811341255
but i want list of contact like this
Name: andrew Number: +7811341255
Name: person2 Number: +44124156
Name: person3 Number: +212113
....list of no of contact in phone what can i do ..please help me....