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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Sample Phonebook Example

Files:

Phone Book

This example shows how to write a simple phonebook with the Contacts API.

Motivation

This application was written to provide an example to developers of how to use the Qt Contacts API. It also provides an example implementation of a vCard* serialiser and deserialiser, which enables persistent storage of QContact objects if no other persistent-storage backend is available.

[*] vCard is a registered trademark of the Internet Mail Consortium

Use Case

Most people have a need to store information (such as addresses, telephone numbers and email addresses) of people that they know. This sample application provides a simple phone book which allows users to store certain pieces of information about their contacts, and save them to disc.

Interface

The application is aimed at desktop platforms as opposed to mobile platforms, and thus uses regular widgets as the basis of the interface. The main screen consists of a list view on the left, the current contact's details in the middle, and several navigation and control buttons on the right.

Screenshot of the sample phone book

The interface of the application is similar to that found in the Qt Addressbook Tutorial. Indeed, several sections of its code (including the "Find Contact" dialog code, and some of the main window interface and initialisation code) was recycled.

Known Issues

The example is not intended to be feature complete. Only a very limited subset of detail types are supported by the application. It exercises only a very small portion of the Qt Contacts API.

Furthermore:

  • You cannot export an unsaved contact.
  • Exporting a saved contact to which changes have been made where those changes have not been saved will result in the original, currently saved contact being exported.
  • Duplicate contacts are not filtered out - importing the same contact twice results in two identical contacts appearing in the list.

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 qtmobility-1.0-tp
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