×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Setting up environment for Qt Mobility API

From Nokia Developer Wiki
Jump to: navigation, search
rahul.kulshreshtha (Talk | contribs)
(Setup Qt Mobility API)
hamishwillee (Talk | contribs)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Qt]][[Category:Qt for Symbian]][[Category:Qt Mobility]]
+
{{Archived|The Qt Mobility APIs are now present in the [[Qt SDK]], which is the only SDK available for mobile development.}}
 
+
{{ArticleMetaData <!-- v1.2 -->
 
+
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
= Overview =
+
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
This article covers how to set up environment to work with Qt Mobility API.
+
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
 
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) -->
 +
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 +
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 +
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20100308
 +
|author= [[User:Kiran10182]]
 +
}}
 +
[[Category:Qt Mobility]][[Category:Symbian C++]]
 +
__TOC__
 +
This article explains how to set up a Symbian SDK to work with Qt Mobility APIs (this is no longer necessary because the APIs are included in the [[Qt SDK]]).
 +
{{Abstract|Deprecated)}}
  
 
= Prerequisites =
 
= Prerequisites =
* Install the S60 SDK: [http://www.forum.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html S60 Platform and Device SDKs for Symbian OS]. (In this article, S60 5th Edition SDK is used)
+
* Install the S60 SDK: [http://www.developer.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html S60 Platform and Device SDKs for Symbian OS]. (In this article, S60 5th Edition SDK is used)
 
* Use Carbide.c++ or Qt Creator as an IDE ((In this article, Carbide.c++ v2.4 is used).
 
* Use Carbide.c++ or Qt Creator as an IDE ((In this article, Carbide.c++ v2.4 is used).
** To set up Carbide.c++, first install [http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/ Carbide.c++ v2.3].
+
** To set up Carbide.c++, first install [http://www.developer.nokia.com/Resources/Tools_and_downloads/Other/Carbide.c++/ Carbide.c++ v2.3].
** Upgrade it to latest version as shown in [http://blogs.forum.nokia.com/blog/lucian-tomutas-forum-nokia-blog/2010/02/01/upgrade-to-carbide.c-2.4 this blog post].
+
** Upgrade it to latest version as shown in [http://www.developer.nokia.com/Community/Blogs/blog/lucian-tomutas-forum-nokia-blog/2010/02/01/upgrade-to-carbide.c-2.4 this blog post].
  
 
= Steps =  
 
= Steps =  
  
== Setup Qt for Symbian ==
+
== Setup Qt ==
* Download [http://qt.nokia.com/downloads/symbian-cpp Qt for Symbian].
+
* Download [http://qt.nokia.com/products/platform/symbian/ Qt].
  
 
* Install it on your PC.
 
* Install it on your PC.
Line 21: Line 42:
  
 
* Choose the path of installation
 
* Choose the path of installation
[[File:Qt4.6.2_choose_path.PNG]]<br>
+
[[File:Qt4.6.2 choose path.PNG]]<br>
  
  
 
* Choose the Symbian SDK(s)
 
* Choose the Symbian SDK(s)
[[File:Qt4.6.2_choose_SDK.PNG]]<br>
+
[[File:Qt4.6.2 choose SDK.PNG]]<br>
  
  
* Qt for Symbian provides a command prompt configured with the correct paths and environment variables for building Qt applications from the command line:
+
* Qt provides a command prompt configured with the correct paths and environment variables for building Qt applications from the command line:
[[File:Qt4.6.2_command_prompt.PNG]]<br>
+
[[File:Qt4.6.2 command prompt.PNG]]<br>
  
  
 
{{Note|Before testing a Qt application on a (S60 3rd Edition or 5th Edition) phone, Qt libraries must be installed on the device. Easiest way to do this is to connect the device to the PC using Nokia [[PC Suite]] and use the '''''qt_installer.sis''''', located in the root folder of Qt installation. This .sis file will install all Qt libraries and dependencies to an S60 device.}}
 
{{Note|Before testing a Qt application on a (S60 3rd Edition or 5th Edition) phone, Qt libraries must be installed on the device. Easiest way to do this is to connect the device to the PC using Nokia [[PC Suite]] and use the '''''qt_installer.sis''''', located in the root folder of Qt installation. This .sis file will install all Qt libraries and dependencies to an S60 device.}}
  
 
[[Category:Qt]][[Category:Symbian C++]]
 
 
== Setup Qt Mobility API ==  
 
== Setup Qt Mobility API ==  
* After successful installation of Qt for Symbian, the next step is to set up Qt Mobility
+
* After successful installation of Qt, the next step is to set up Qt Mobility
* Download [http://qt.nokia.com/developer/new-qt-apis QtMobility API] (also known as ''New Qt APIs'') source and binary package for Symbian.
+
* Download [http://qt.nokia.com/developer/qt-roadmap QtMobility API] (also known as ''New Qt APIs'') source and binary package for Symbian.
* '''Edited by Rahul''' - I downloaded from here [http://qt.nokia.com/products/appdev/add-on-products/catalog/4/new-qt-apis/mobility QTMobilitySymbian API] above link was not having zip files required in next steps.
+
* '''Edited by Rahul''' - I downloaded from here [http://qt.nokia.com/products/qt-addons QTMobilitySymbian API] above link was not having zip files required in next steps.
* Extract the file to a suitable location. Here, <tt>C:\Qt</tt> is used.
+
* Extract the file to a suitable location. Here, {{Icode|C:\Qt}} is used.
 
* Inside the package, you'll find the following files:
 
* Inside the package, you'll find the following files:
  
** <tt>qt-mobility-1.0.0-epoc32-3.1.zip</tt>
+
** {{Icode|qt-mobility-1.0.0-epoc32-3.1.zip}}
** <tt>qt-mobility-1.0.0-epoc32-3.2.zip</tt>
+
** {{Icode|qt-mobility-1.0.0-epoc32-3.2.zip}}
** <tt>qt-mobility-1.0.0-epoc32-5.0.zip</tt>
+
** {{Icode|qt-mobility-1.0.0-epoc32-5.0.zip}}
** <tt>convenienceheaders.zip</tt>
+
** {{Icode|convenienceheaders.zip}}
** <tt>qtmobility.sis</tt><br>
+
** {{Icode|qtmobility.sis}}<br>
  
* Extract <tt>qt-mobility-1.0.0-epoc32-<nowiki><S60 SDK></nowiki>.zip</tt> packages into the root folder of the respective S60 SDK.  
+
* Extract {{Icode|qt-mobility-1.0.0-epoc32-<nowiki><S60 SDK></nowiki>.zip}} packages into the root folder of the respective S60 SDK.  
  
** For example, if using S60 5th Edition SDK, extract <tt>qt-mobility-1.0.0-epoc32-5.0.zip</tt> into <tt>C:\S60\devices\S60_5th_Edition_SDK_v1.0</tt>. Repeat this step for all the Symbian SDKs you selected during Qt for Symbian installation.
+
** For example, if using S60 5th Edition SDK, extract {{Icode|qt-mobility-1.0.0-epoc32-5.0.zip}} into {{Icode|C:\S60\devices\S60_5th_Edition_SDK_v1.0}}. Repeat this step for all the Symbian SDKs you selected during Qt installation.
  
  
* Extract <tt>convenienceheaders.zip</tt> into the root folder of each S60 SDK (as above).
+
* Extract {{Icode|convenienceheaders.zip}} into the root folder of each S60 SDK (as above).
** This will enable Qt style include statements (e.g. <tt>#include <QSystemInfo></tt> instead of <tt>#include <qsysteminfo.h></tt>).
+
** This will enable Qt style include statements (e.g. {{Icode|#include <QSystemInfo>}} instead of {{Icode|#include <qsysteminfo.h>}}).
  
  
* Install <tt>qtmobility.sis</tt> file to device. You can do this, for example, via bluetooth or using Nokia [[PC Suite]] (recommended).
+
* Install {{Icode|qtmobility.sis}} file to device. You can do this, for example, via bluetooth or using Nokia [[PC Suite]] (recommended).
** Supported devices: S60 3rd Edition, Feature Pack 1 or later. see http://www.forum.nokia.com/devices/ for device-specific information.
+
** Supported devices: S60 3rd Edition, Feature Pack 1 or later. see http://www.developer.nokia.com/Devices/ for device-specific information.
  
  
* Copy (and rename) <tt>C:/Qt/qt-mobility-symbian-opensource-1.0.0/features/mobility.prf.template</tt> file to <tt><nowiki><QTDIR></nowiki>/mkspecs/features/mobility.prf</tt>
+
* Copy (and rename) {{Icode|C:/Qt/qt-mobility-symbian-opensource-1.0.0/features/mobility.prf.template}} file to {{Icode|<nowiki><QTDIR></nowiki>/mkspecs/features/mobility.prf}}
** <QTDIR> can be obtained by running 'qmake -v' from the Qt for Symbian command prompt.
+
** <QTDIR> can be obtained by running 'qmake -v' from the Qt command prompt.
  
  
Line 70: Line 89:
 
== Building the examples ==
 
== Building the examples ==
  
To test that you have a working environment, try building the examples from Qt for Symbian command prompt:
+
To test that you have a working environment, try building the examples from Qt command prompt:
  
 
<code>
 
<code>
Line 86: Line 105:
  
  
To generate a sis package and automatically deploy it to a device connected to [[PC Suite]],  use <tt>createpackage</tt> command with <tt>-i</tt> option. For example:
+
To generate a sis package and automatically deploy it to a device connected to [[PC Suite]],  use {{Icode|createpackage}} command with {{Icode|-i}} option. For example:
  
 
<code>
 
<code>
Line 94: Line 113:
  
  
{{Note|Using <tt>createpackage</tt> without ''certificate'' option will sign the application with a self-signed certificate. Only those examples that use basic capabilities (<tt>[http://library.forum.nokia.com/topic/Qt_for_Symbian_Developers_Library/GUID-5D7478BB-FFC0-48D3-ABB6-76E12F6AC3D5.html TARGET.CAPABILITY]</tt> in .pro file), granted by the user during installation, can be self-signed. See [[Capabilities]] for more information. }}<br>
+
{{Note|Using {{Icode|createpackage}} without ''certificate'' option will sign the application with a self-signed certificate. Only those examples that use basic capabilities ({{Icode|[http://library.developer.nokia.com/topic/Qt_for_Symbian_Developers_Library/GUID-5D7478BB-FFC0-48D3-ABB6-76E12F6AC3D5.html TARGET.CAPABILITY]}} in .pro file), granted by the user during installation, can be self-signed. See [[Capabilities]] for more information. }}<br>
  
 
= Related articles =  
 
= Related articles =  
Line 110: Line 129:
 
* [http://qt.nokia.com/ Qt - cross-platform application and UI framework]
 
* [http://qt.nokia.com/ Qt - cross-platform application and UI framework]
 
* [http://labs.trolltech.com/page/Projects/QtMobility Qt Mobility API]
 
* [http://labs.trolltech.com/page/Projects/QtMobility Qt Mobility API]
* [http://qt.nokia.com/developer/new-qt-apis New Qt APIs Beta - Mobility Project]
+
* [http://qt.nokia.com/developer/qt-roadmap New Qt APIs Beta - Mobility Project]
* SDK help
+
* SDK help[[Category:MeeGo Harmattan]] [[Category:Symbian]]

Latest revision as of 08:15, 21 June 2012

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The Qt Mobility APIs are now present in the Qt SDK, which is the only SDK available for mobile development.

Article Metadata
Compatibility
Platform(s):
Symbian
Article
Created: kiran10182 (08 Mar 2010)
Last edited: hamishwillee (21 Jun 2012)

Contents

This article explains how to set up a Symbian SDK to work with Qt Mobility APIs (this is no longer necessary because the APIs are included in the Qt SDK). Deprecated)

[edit] Prerequisites

[edit] Steps

[edit] Setup Qt

  • Download Qt.
  • Install it on your PC.

Qt4.6.2.PNG

  • Choose the path of installation

Qt4.6.2 choose path.PNG


  • Choose the Symbian SDK(s)

Qt4.6.2 choose SDK.PNG


  • Qt provides a command prompt configured with the correct paths and environment variables for building Qt applications from the command line:

Qt4.6.2 command prompt.PNG


Note.pngNote: Before testing a Qt application on a (S60 3rd Edition or 5th Edition) phone, Qt libraries must be installed on the device. Easiest way to do this is to connect the device to the PC using Nokia PC Suite and use the qt_installer.sis, located in the root folder of Qt installation. This .sis file will install all Qt libraries and dependencies to an S60 device.

[edit] Setup Qt Mobility API

  • After successful installation of Qt, the next step is to set up Qt Mobility
  • Download QtMobility API (also known as New Qt APIs) source and binary package for Symbian.
  • Edited by Rahul - I downloaded from here QTMobilitySymbian API above link was not having zip files required in next steps.
  • Extract the file to a suitable location. Here, C:\Qt is used.
  • Inside the package, you'll find the following files:
    • qt-mobility-1.0.0-epoc32-3.1.zip
    • qt-mobility-1.0.0-epoc32-3.2.zip
    • qt-mobility-1.0.0-epoc32-5.0.zip
    • convenienceheaders.zip
    • qtmobility.sis
  • Extract qt-mobility-1.0.0-epoc32-<S60 SDK>.zip packages into the root folder of the respective S60 SDK.
    • For example, if using S60 5th Edition SDK, extract qt-mobility-1.0.0-epoc32-5.0.zip into C:\S60\devices\S60_5th_Edition_SDK_v1.0. Repeat this step for all the Symbian SDKs you selected during Qt installation.


  • Extract convenienceheaders.zip into the root folder of each S60 SDK (as above).
    • This will enable Qt style include statements (e.g. #include <QSystemInfo> instead of #include <qsysteminfo.h>).


  • Install qtmobility.sis file to device. You can do this, for example, via bluetooth or using Nokia PC Suite (recommended).


  • Copy (and rename) C:/Qt/qt-mobility-symbian-opensource-1.0.0/features/mobility.prf.template file to <QTDIR>/mkspecs/features/mobility.prf
    • <QTDIR> can be obtained by running 'qmake -v' from the Qt command prompt.


You now have a working environment for building Qt projects that use QtMobility libraries.

[edit] Building the examples

To test that you have a working environment, try building the examples from Qt command prompt:

C:/Qt/qt-mobility-symbian-opensource-1.0.0> configure -examples


If configure completes successfully, build the examples:

C:/Qt/qt-mobility-symbian-opensource-1.0.0> cd examples
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> qmake
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> make release-gcce


To generate a sis package and automatically deploy it to a device connected to PC Suite, use createpackage command with -i option. For example:

C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> cd bearercloud
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples/bearercloud> createpackage -i bearercloud_template.pkg release-gcce


Note.pngNote: Using createpackage without certificate option will sign the application with a self-signed certificate. Only those examples that use basic capabilities (TARGET.CAPABILITY in .pro file), granted by the user during installation, can be self-signed. See Capabilities for more information.


[edit] Related articles

[edit] Reference links

This page was last modified on 21 June 2012, at 08:15.
257 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×