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  · 

The Symbian platform - Introduction to Qt

Required Tools

See Qt for the Symbian platform Requirements to see what tools are required to use Qt for the Symbian platform.

Installing Qt and Running Demos

Follow the instructions found in Installing Qt for the Symbian platform to learn how to install Qt using using source package and how to build and run the Qt demos.

Building Your Own Applications

If you are new to Qt development, have a look at How to Learn Qt. In general, the difference between developing a Qt application on the Symbian platform compared to any of the other platforms supported by Qt is not that big.

Once you have created a .pro file for your project, generate the Symbian specific Bld.inf and .mmp files this way:

     qmake

For more information on how to use qmake have a look at the qmake Tutorial. In particular, see the qmake Platform Notes for details of Symbian-specific build settings.

Now you can build the Qt for the Symbian platform application with standard build tools.

Alternative Build Targets

By default, running make will produce binaries for the emulator. However, the Symbian platform comes with several alternative build targets that can be used to create binaries for target hardware and deploy them on devices, as shown in the table below:

debug-winscwBuild debug binaries for the emulator (default). It is currently not possible to build release binaries for the emulator.
debug-gcceBuild debug binaries for hardware using GCCE.
release-gcceBuild release binaries for hardware using GCCE.
debug-armv5Build debug binaries for hardware using RVCT.
release-armv5Build release binaries for hardware using RVCT.
runRun the application on the emulator.
runonphoneRun the application on a device.
deployDeploys the project into a device.
sisCreate signed .sis file for project.
unsigned_sisCreate unsigned .sis file for project.
installer_sisCreate signed smart installer .sis file for project. Smart installer will attempt to download missing dependencies in addition to just installing the application. Note: The application .sis contained in smart installer .sis will be recreated and signed with same certificates as smart installer .sis.
ok_installer_sisOtherwise similar to installer_sis target, except the application sis will not be recreated. This is useful when application .sis needs to be separately signed before including it into smart installer .sis.
unsigned_installer_sisCreate unsigned smart installer .sis file for project. Note: The application .sis contained in smart installer .sis will also be unsigned.
stub_sisCreate a stub sis to allow upgradability of projects that are deployed in ROM

The following lines perform a debug build for the emulator and deploy all the needed files:

     make debug-winscw

To work on your project in Carbide, simply import the .pro file by right clicking on the project explorer and executing "Import...".

Running Applications from the Command Line

The application can be launched on the emulator using make run command.

The application can be launched on a device using make runonphone command. When this command is invoked, a .sis file is first created as if make sis command was invoked (see above for details). Note: Running the application on a device using this command requires TRK application to be running on the device.

Additional environment variables that can be utilized with these commands are:

QT_RUN_OPTIONSAny command line parameters you wish to pass to your application.
QT_RUN_ON_PHONE_OPTIONSOptions for runonphone application. Execute runonphone from command line for more information about available options. make runonphone only.

Installing Your Own Applications

To install your own applications on hardware, you need a signed .sis file. (Refer to the Symbian Platform Security article for more informations about self-signing.) The signed .sis file can be created with make sis target. sis target is only supported for executables or projects with DEPLOYMENT statements. By default the sis target will create signed .sis file for last build target. For example, the following sequence will generate the needed makefiles, build the project for debug-winscw and release-armv5, and create self-signed .sis file for release-armv5 target:

     qmake
     make debug-winscw release-armv5
     make sis

If you want to use different certificate information or override the default target for .sis file creation you can use the environment variables as shown in the table below:

QT_SIS_OPTIONSOptions accepted by .sis creation. See Supported options below. By default no otions are given.
QT_SIS_TARGETTarget for which .sis file is created. Accepted values are build targets listed in previous table. By default last build target.
QT_SIS_CERTIFICATEThe certificate file used for signing. By default self-signed certificate.
QT_SIS_KEYThe certificate's private key file. By default key is associated to self-signed certificate.
QT_SIS_PASSPHRASEThe certificate's private key file's passphrase. By default empty.

The supported options for QT_SIS_OPTIONS:

-iInstall the package right away using PC suite.
-pOnly preprocess the template .pkg file.
-c <file>Read certificate information from a file.
-uPreserves unsigned package.
-oCreates only unsigned package.
-sGenerates stub sis for ROM.
-n <name>Specifies the final sis name.
-gTreat gcce platform as armv5.
-dSkip automatic patching of the package when default certificate is used.

Execute the createpackage.pl script without any parameters for detailed information about options. By default no options are given.

For example:

    set QT_SIS_TARGET=debug-armv5
    make sis

The environment variables for make can also be given as parameters:

    make sis QT_SIS_TARGET=debug-armv5

If you want to install the program immediately after creating .sis file, make sure that the device is connected to the computer in "PC Suite" mode, and use deploy target instead of sis target:

    make deploy

Deployment and the Smart Installer

Although some Symbian devices may already have a version of Qt installed on them, there needs to be a way to ensure that an appropriate version of Qt is available for your application to use. Rather than deploy the required Qt libraries with your application, the preferred way to package Qt applications for deployment is to download and use the Smart Installer.

The Smart Installer makes sure that deployed applications have all the Qt dependencies they need to run on a device, performing the necessary updates when the user installs the application.

More information about deployment can be found in the Deploying an Application on the Symbian Platform document.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Comment fermer une application

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 4.7
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