Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Qt Quick Contacts List View Example

Contacts List

This example shows how to write a simple Contacts browsing application with the Contacts QML API

Motivation

This application was written to provide an example to developers of how to use the Qt Quick Contacts APIs.

It provides an example of how to use the Qt Contacts library to:

  • import new contact information from vCard files
  • select a backend for volatile memory or persistent storage
  • list the stored Contacts information
  • add Contacts
  • edit Contacts
  • remove Contacts

Use Case

Its is common necessity for people to keep well organized and persistent lists of all their friends, relatives, business partners and etc. All these contacts can have associate information such as phone numbers, email addresses, relations between other contacts.

This sample application provides a simple contacts browser that allows users to retrieve all their Contacts and information associated with them. Users can add new contacts, modify or delete existing ones.

Interface

The interface is organized into a QML List View, showing all the available contacts. Contacts can be added or modified using the buttons at the bottom of the contact list. Selecting the contact is simply done by clicking the mouse on the desired list element, that opens the selected contact in editing view.

Here we see the ContactModel used with a QML List View to show a basic information of contacts.

In edit mode you can delete a contact by using delete button at the bottom of the window or you can modify a contact's details just by entering a new value in text input fields. Modified values are indicated in red color and they must be saved to take affect or changes can be discarded by using cancel button which is also placed at the bottom of the window.

Here we can see an example of how a contact looks when opened in an editing view.

This example application is designed to introduce very basic usage of the API and get you stared with QtContacts library.

Files:

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web