×

Discussion Board

Results 1 to 2 of 2

Thread: contacts list

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    16

    contacts list

    Hi
    I'm writing a new application on Qt&Symbian. But i need to access contacts list and i want to assign contacts list into QString array. How can i do this.

    Thanks.

  2. #2
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: contacts list

    it could help only as quickstart then look at official doc and wiki
    #ifndef CONTACTS_H
    #define CONTACTS_H
    #include <QObject>
    #include "qtcontacts.h"
    QTM_USE_NAMESPACE
    class Contacts : public QObject
    {
    Q_OBJECT
    public:
    explicit Contacts(QObject *parent = 0);
    QContactManager *m_manager;
    QList<QContact> m_contacts;
    QContactFilter m_currentFilter;

    signals:

    public slots:

    };
    #include <QDebug>
    #include "contacts.h"

    #ifdef BUILD_VERSIT
    #include "qversitreader.h"
    #include "qversitcontactimporter.h"
    #include "qversitwriter.h"
    #include "qversitcontactexporter.h"
    #endif

    Contacts::Contacts(QObject *parent) : QObject(parent){
    m_manager = new QContactManager("symbian");
    m_currentFilter = QContactFilter();
    m_contacts = m_manager->contacts(m_currentFilter);
    foreach (QContact contact, m_contacts) {
    QString s=contact.displayLabel();
    QContactDetail detail=contact.detail(QContactPhoneNumber:efinitionName);
    QString p=detail.value("PhoneNumber");
    //qDebug()<<s<<p;
    }
    }
    CONFIG += mobility
    MOBILITY = contacts
    contains(mobility_modules,versit) {
    MOBILITY += versit
    DEFINES += BUILD_VERSIT
    }
    Last edited by lucarocchi; 2011-01-01 at 18:34.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

Similar Threads

  1. Using list box to display Contacts from Contacts database
    By chaithrakumar in forum Symbian User Interface
    Replies: 10
    Last Post: 2009-09-18, 08:52
  2. Contacts list problem
    By vineet.jain in forum Symbian
    Replies: 8
    Last Post: 2009-09-12, 10:16
  3. Wants to add multiple contacts in to Handset Contacts list
    By harshalpatil in forum Mobile Java General
    Replies: 3
    Last Post: 2008-12-18, 13:07
  4. How to get the list of contacts programmatically
    By skvladimir in forum Series 40 & S60 Platform Feedback Archive
    Replies: 1
    Last Post: 2008-07-28, 12:49
  5. Delete a list of contacts
    By zikman9 in forum Symbian
    Replies: 2
    Last Post: 2003-08-27, 23:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×