Tutorial: Creating a New Application
|
File Name | Description |
---|---|
qbuild.pro | The qbuild.pro file is used to describe how the application is to be built. For hints on what content be added see the example application's qbuild.pro; see also Project Files |
.desktop | Each application will have a .desktop file to give application information to Qt Extended, such as what icon to use to display the application in the application launcher list, see also Desktop File Standard |
.ui | Some applications will have .ui files that has been generated by Qt Designer to specify the user interface for the application, see Qt Designer Manual |
.ts | Some applications will have .ts files to support Internationalization, see also Internationalization |
export QTOPIA_SOURCE_PATH=$HOME/src/qt-extended-<version> export QPEDIR=$HOME/build/qt-extended-<version>-qvfb
(Note that these are example locations, only.) This assumes that the source directory and the build directory are in different locations; these variables might point to the same location.
mkdir $HOME/src/mynewapp cd $HOME/src/mynewapp cp -r $QTOPIA_SOURCE_PATH/examples/application/* . chmod +w *
rename example mynewapp example* mv help/html/example.html help/html/mynewapp.html mv pics/Example.png pics/MyNewApp.png
$QPEDIR/bin/qbuild # build source files $QPEDIR/bin/qbuild image # install the created application into image
There should now be an executable version of mynewapp in the directory $QPEDIR/image/bin.
$QPEDIR/bin/runqtopia
The application MyNewApp should appear in the Applications list on the desktop display. Running the application should reveal a simple UI containing a label and a button. Help documentation is also available from the context menu.
MyNewApp can now be modified to incorporate new or existing code. Qt and Qt Extended public classes can be used to facilitate this process. Qt Designer can be used to generate a new user interface file (mynewappbase.ui) for the application. Alternatively, a new user interface can be coded by hand. Help documentation should be provided by modifying help/html/mynewapp.html.
To generate a completely new qbuild.pro file with the files found in the current directory, use the command:
$QPEDIR/bin/qbuild -project
then edit the qbuild.pro project as required. See also Create a new project file.
For information on how to improve application startup times (including the use of Quicklauncher), please refer to: Writing Applications that Start Quickly.
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 qtextended4.4 | |
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 ! |
Copyright © 2000-2012 - www.developpez.com