<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=192.100.124.220</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=192.100.124.220"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/192.100.124.220"/>
	<updated>2026-04-22T02:02:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Enterprise_Deployment_Guide&amp;diff=9534</id>
		<title>Enterprise Deployment Guide</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Enterprise_Deployment_Guide&amp;diff=9534"/>
		<updated>2010-12-17T13:51:49Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Enterprise environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Table of contents =&lt;br /&gt;
&lt;br /&gt;
* [[Enterprise_Deployment_Guide|N900 Enterprise Deployment Guide]]&lt;br /&gt;
** [[Enterprise_-_Manual_Installation_and_Configuration|Enterprise Manual Installation and Configuration]]&lt;br /&gt;
** [[Enterprise_Provisioning|Enterprise Provisioning]]&lt;br /&gt;
*** [[Enterprise_-_Tried_and_tested_provisioning_strategies|Tried and tested provisioning strategies]]&lt;br /&gt;
*** [[Enterprise_Provisioning_-_Strategy_Variations|Provisioning Strategy Variations]]&lt;br /&gt;
*** [[Enterprise_Provisioning_-_Appendix|Provisioning Appendix]]&lt;br /&gt;
*** [[Enterprise_Provisioning_-_Future_Prospects|Provisioning Future Prospects]]&lt;br /&gt;
*** [[Enterprise_Provisioning_Summary|Enterprise Provisioning Summary]]&lt;br /&gt;
** [[Enterprise_Device_Configuration|Enterprise Device configuration]]&lt;br /&gt;
*** [[Enterprise_Configurator|Enterprise Configurator]]&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
This document is an unofficial guide as Nokia N900 is not categorized as an enterprise device.&lt;br /&gt;
&lt;br /&gt;
== N900 and Maemo ==&lt;br /&gt;
[[Nokia N900]] is a powerful mobile computer with a phone feature. One area where the capabilities of N900 can be harnessed is the Enterprise environment. The device can be configured easily for providing access to corporate services and resources like:&lt;br /&gt;
* email&lt;br /&gt;
* intranet web pages&lt;br /&gt;
* instant messenger&lt;br /&gt;
* VoIP services&lt;br /&gt;
&lt;br /&gt;
The open architecture of the Maemo platform enables the integration of such enterprise services with minimal effort.&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
This document describes the steps involved in deploying Nokia N900 in Enterprise environment. The primary objective of deploying the device in Enterprise environment is to improve the productivity of users in their work life.&lt;br /&gt;
&lt;br /&gt;
== Scope of document ==&lt;br /&gt;
The document gives examples of software that can be installed and configured on the N900 for the Enterprise environment. Additionally the document describes the infrastructure to be put in place for installing the device side software.&lt;br /&gt;
&lt;br /&gt;
= Enterprise environment =&lt;br /&gt;
&lt;br /&gt;
Enterprise environments vary greatly and it is impossible to give a description that fits any company. However, most companies utilize a rather similar strategy in controlling access to their networks and the following description is rather close to most common solutions.&lt;br /&gt;
&lt;br /&gt;
[[Image:EDG_Typical_Enterprise_network_environment.png|900px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:200px;&amp;quot;&amp;gt;Figure 1: Typical Enterprise network environment&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Figure 1 describes a typical arrangement of networking components at an enterprise. The picture is simplified and only components that are relevant for Enterprise provisioning are displayed. &lt;br /&gt;
&lt;br /&gt;
Typically, corporate intranet is not directly accessible via WLAN connection due to obvious security implications. Instead, WLAN connections allow access to some &amp;quot;lobby&amp;quot; network. These lobby networks might or might not allow access to the public Internet. Lobby networks might be public, or they might be protected using some WLAN encryption technology.&lt;br /&gt;
&lt;br /&gt;
The arrangement shown in Figure 1 consists of two different kinds of lobby networks and an access gateway between these. In addition, there is usually a 3G access network. Arrangements in different enterprises may vary, but the picture shows typical ways a device can be connected. Relevant characteristics of these networks are&lt;br /&gt;
* Public access network:&lt;br /&gt;
** Access is public, features are limited&lt;br /&gt;
** No connection to public Internet&lt;br /&gt;
** Mostly used for VPN connections to corporate intranet&lt;br /&gt;
** Might offer access to public Internet via authenticating gateway&lt;br /&gt;
* Restricted access network&lt;br /&gt;
** Access is restricted, features are unlimited&lt;br /&gt;
** Connection to public Internet&lt;br /&gt;
** Uses some WLAN encryption technology&lt;br /&gt;
** Device is unable to use the network until encryption keys are delivered&lt;br /&gt;
* 3G network&lt;br /&gt;
** Unrestricted access to public Internet&lt;br /&gt;
** No simultaneous access to WLAN networks above&lt;br /&gt;
&lt;br /&gt;
= Provisioning =&lt;br /&gt;
&lt;br /&gt;
Provisioning strategies are ways to get the device configured for enterprise use so that the user doesn&#039;t have to [[Enterprise_-_Manual_Installation_and_Configuration|manually install and configure]] all the software on the device.&lt;br /&gt;
&lt;br /&gt;
The selection of the provisioning strategy has a strong influence in every subsequent step and it is best to [[Enterprise_Provisioning|start by reading the provisioning introduction]] which is a highly recommended reading for first time readers to understand our terminology better.&lt;br /&gt;
&lt;br /&gt;
[[Category:Power users]]&lt;br /&gt;
[[Category:Enterprise]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34268</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34268"/>
		<updated>2010-01-26T11:15:29Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Using gdb &amp;amp; gdbserver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
That&#039;s not a big problem. You can run Maemo SDK in a virtual machine;&lt;br /&gt;
You can download Maemo SDK virtual Image (Linux Ubuntu + Diablo and Fremantle SDK)&lt;br /&gt;
from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com].&lt;br /&gt;
You can get VMPlayer from [http://www.vmware.com/products/player/ here].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
Maemo SDK can be installaed in any Linux environment.&lt;br /&gt;
However Debian based distros (eg: Ubuntu) are recommended.&lt;br /&gt;
&lt;br /&gt;
Documentation you need to install Maemo SDK is [http://maemo.org/development/sdks/ here].&lt;br /&gt;
&lt;br /&gt;
=== Installing Qt packages in Scratchbox ===&lt;br /&gt;
Maemo Qt developers offers a set of Qt packages for Diablo (Maemo4.1 - OS2008)&lt;br /&gt;
and Fremantle (Maemo5 - OS2009).&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
Diablo Qt packages are into the official Extras repository.&lt;br /&gt;
In order to start to develop with those packages you need to add&lt;br /&gt;
extras repository to your repository list.&lt;br /&gt;
&lt;br /&gt;
 1. Open /etc/apt/source.list with a text editor (eg: kate, gedit...)&lt;br /&gt;
 2. Append the following line to that file: &lt;br /&gt;
     deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 3. Then update your APT cache with&lt;br /&gt;
      &amp;lt;i&amp;gt;apt-get update&amp;lt;/i&amp;gt;&lt;br /&gt;
 4. Install Qt packages with&lt;br /&gt;
      &amp;lt;i&amp;gt;apt-get install libqt4-dev&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
You don&#039;t need to add any extra repository for Fremantle since Qt packages are already available into the SDK. You can find more information on installing Qt on Fremantle, and help improve Qt on Maemo, [[QT/Testing | on the Qt testing page]].&lt;br /&gt;
&lt;br /&gt;
Then you can install Qt with:&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
==== Using Qt 4.6 Betas in Fremantle ====&lt;br /&gt;
If you want to test your applications with the latest Qt 4.6 Beta version, either compile it [[Qt_Maemo_Git_Process|directly from the git repos]] or install the libqt4-maemo5-dev package.&lt;br /&gt;
&lt;br /&gt;
For the latter you need to enable access to the extra devel repositories first (if you haven&#039;t done so yet). Inside of scratchbox, for your i486 target (ARM is very similar), do the following:&lt;br /&gt;
&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot echo &amp;quot;deb http://repository.maemo.org/extras/ fremantle free non-free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot echo &amp;quot;deb-src http://repository.maemo.org/extras/ fremantle free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot echo &amp;quot;deb http://repository.maemo.org/extras-devel fremantle free non-free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot echo &amp;quot;deb-src http://repository.maemo.org/extras-devel fremantle free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
To install the tech preview:&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot apt-get update&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot apt-get remove libqt4*&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot apt-get install libqt4-maemo5-dev&lt;br /&gt;
&lt;br /&gt;
Qt is installed to /opt/qt4-maemo5.&lt;br /&gt;
&lt;br /&gt;
If you happen to use autotools, this will recompile the code against the beta:&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; cd ~/your/project/folder&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; make distclean #dont worry if it fails&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; ./autogen.sh QT_PATH=/opt/qt4-maemo5/bin&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt; make&lt;br /&gt;
&lt;br /&gt;
For qmake you might have to set the QT_INSTALL_PREFIX correctly.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
Qt applications are usually built using QMake. Project like KDE instead replaced&lt;br /&gt;
QMake with CMake for more flexibility.&lt;br /&gt;
 &lt;br /&gt;
==== QMake ====&lt;br /&gt;
[http://doc.trolltech.com/4.5/qmake-manual.html QMake] is a tool from Trolltech that helps simplify the build process for development project across different platforms&lt;br /&gt;
&lt;br /&gt;
You can build your Maemo Qt application in 3 simple steps:&lt;br /&gt;
 1. Generating project file [Required if there is not .pro file into the app source tree]&lt;br /&gt;
    &amp;lt;i&amp;gt;qmake -project&amp;lt;/i&amp;gt;&lt;br /&gt;
 2. Generating Makefile from the QMake project file:&lt;br /&gt;
    qmake file.pro&lt;br /&gt;
 3. make&lt;br /&gt;
&lt;br /&gt;
==== CMake ====&lt;br /&gt;
&lt;br /&gt;
As told before it&#039;s not a standard tool but it&#039;s largely used from people and application coming from the [[KDE]] world.&lt;br /&gt;
&lt;br /&gt;
Because of some issue with [[CMake]], [[Diablo]] CMake packages are currently useless since CMake segfaults (on the device at least).&lt;br /&gt;
&lt;br /&gt;
This issue has been solved in [[Fremantle]] and CMake packages that comes from Fremantle [[SDK]] work nicely.&lt;br /&gt;
&lt;br /&gt;
 - CMake projects has usually a CMakeLists.txt file instead of &lt;br /&gt;
     - .pro file used by QMake projects&lt;br /&gt;
     - Makefile.am used by Autotools projects (standard in Unix/[[Linux]])&lt;br /&gt;
&lt;br /&gt;
Using CMake to build the project is extremely easy.&lt;br /&gt;
In the directory containing CMakeLists.txt, supply the following two commands, where path is the path to the source code.&lt;br /&gt;
&lt;br /&gt;
 - cmake path&lt;br /&gt;
 - make&lt;br /&gt;
&lt;br /&gt;
Note: CMake is not installed by default in [[scratchbox]]. You can install it with&lt;br /&gt;
 &amp;lt;i&amp;gt;fakeroot apt-get install cmake&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in: ===&lt;br /&gt;
====A. Scratchbox====&lt;br /&gt;
Diablo and Fremantle Qt applications can run into the device as into scratchbox.&lt;br /&gt;
&lt;br /&gt;
First step to run a Qt application is starting the SDK UI:&lt;br /&gt;
 &lt;br /&gt;
1. Run Xephyr. It&#039;s able to run a [http://en.wikipedia.org/wiki/X_Window_System  X Server] inside another X Server. &lt;br /&gt;
 &amp;lt;i&amp;gt;Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb&amp;lt;/i&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
2. Set display for application that runs inside scratchbox&lt;br /&gt;
 &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;[sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt;&amp;lt;/b&amp;gt; export DISPLAY=:2&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. You can now run the SDK UI. Diablo or Fremantle desktop will appear into your Xephyr window:&lt;br /&gt;
 &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;[sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt;&amp;lt;/b&amp;gt; af-sb-init.sh start&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Now you are ready to run any Maemo or Maemo Qt application with&lt;br /&gt;
 &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;[sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt;&amp;lt;/b&amp;gt; run-standalone.sh ./qtapps&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: run-standalone.sh sets some variable needed by Qt to use the Hildon style.&lt;br /&gt;
&lt;br /&gt;
====B. device====&lt;br /&gt;
Maemo Qt applications are linux binaries. They can run into the device without any problem if you copy it/them in &amp;quot;partitions&amp;quot; mounted with exec flag. (Eg: /home/user or /opt in Fremantle).&lt;br /&gt;
&lt;br /&gt;
Eg: If we want to run quassel (Qt IRC Client) we have to launch it with:&lt;br /&gt;
 &amp;lt;b&amp;gt;Nokia-N900-44-1:/home/user#&amp;lt;/b&amp;gt; su -c ./quassel user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting Qt applications to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
Hildon Style is the default Qt application style. Other style available are:&lt;br /&gt;
* [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks]&lt;br /&gt;
* [http://doc.trolltech.com/4.4/gallery-windows.html Windows]&lt;br /&gt;
* [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique]&lt;br /&gt;
&lt;br /&gt;
Qt application can use other Qt styles;&lt;br /&gt;
* Running your application with the style flag:&lt;br /&gt;
&amp;lt;i&amp;gt;./qt-test-application -style windows&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Using [http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style of a widget:[http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
&lt;br /&gt;
You can show it again by using method &#039;&#039;statusBar()-&amp;gt;show()&#039;&#039; in your class derived from QMainWindow.&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Qt 4.5 (Diablo and Fremantle)&amp;lt;/b&amp;gt;&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon/Maemo5 code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
Qt project files can load hildon files using: (check [http://doc.trolltech.com/4.5/qmake-function-reference.html qmake ref guide] for more info about qmake options)&lt;br /&gt;
 contains(QT_CONFIG, hildon): {&lt;br /&gt;
    message(&amp;quot;Hello Hildon&amp;quot;)&lt;br /&gt;
    SOURCE += hildon.cpp&lt;br /&gt;
    HEADER += hildon.h&lt;br /&gt;
    FORMS   += hildon.ui&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Qt 4.6 (Fremantle)&amp;lt;/b&amp;gt;&lt;br /&gt;
Q_WS_HILDON has been replaced by Q_WS_MAEMO_5 in Qt 4.6 and Qt 4.5 &amp;quot;contains(QT_CONFIG, hildon):{}&amp;quot; does same job of Qt 4.6 &amp;quot;maemo5 {}&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_MAEMO_5&lt;br /&gt;
    //specific hildon/maemo5 code here&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
 maemo5 {&lt;br /&gt;
    message(&amp;quot;Hello Hildon&amp;quot;)&lt;br /&gt;
    SOURCE += hildon.cpp&lt;br /&gt;
    HEADER += hildon.h&lt;br /&gt;
    FORMS   += hildon.ui&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
=====Using gdb=====&lt;br /&gt;
Fast way is running gdb ./your app.&lt;br /&gt;
&lt;br /&gt;
=====Using gdb &amp;amp; gdbserver=====&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Fremantle Gdb 6.8 crashes in x86 and gives messed up backtraces onto the device. Using gdb 7.0 is recommended. You can get gdb 7.0 sources fromhttp://ftp.de.debian.org/debian/pool/main/g/gdb/gdb_7.0.orig.tar.gz, compile it (./configure &amp;amp;&amp;amp; make) inside X86 and armel scratchbox targets.&lt;br /&gt;
[http://chaos.troll.no/~harald/gdb7/ Here you can find GDB7 for fremantle x86 and armel]. &lt;br /&gt;
 /usr/local/bin/gdb7 ./myapp&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
Valgrind runs programs on a virtual processor and can detect memory errors (e.g., misuse of malloc and free) and race conditions in multithread programs.&lt;br /&gt;
&lt;br /&gt;
It performs a [http://en.wikipedia.org/wiki/Dynamic_program_analysis Dynamic program analysis] (In a few words,dynamic stands for analysis performed while executing the program).&lt;br /&gt;
&lt;br /&gt;
It&#039;s very useful tool to track memory leaks&lt;br /&gt;
&lt;br /&gt;
 run-standalone.sh valgrind --tool=memcheck --leak-check=yes ./Application&lt;br /&gt;
or&lt;br /&gt;
 run-standalone.sh valgrind --leak-check=full ./Application&lt;br /&gt;
&lt;br /&gt;
You can learn more about valngrind at http://www.cprogramming.com/debugging/valgrind.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [[Qt/Benchmark/qgear|QGears]]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares same APIs avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run in Maemo devices as well. &lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
===Diablo===&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext *qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
===FREMANTLE (Qt 4.5)===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Kinetic scrolling====&lt;br /&gt;
Kinetic scrolling is enabled by default in QListWidgets and is supported by any Qt widget that inherits QScrollArea.&lt;br /&gt;
Any item view widgets (QTreeView/QTreeWidget, QListView, QTableView/QTableWidget...) can use fingerscroll if it has &amp;quot;FingerScrollable&amp;quot; dynamic property set to true.&lt;br /&gt;
Eg:&lt;br /&gt;
  QTableWidget *table = new QTableWidget(this);&lt;br /&gt;
  table-&amp;gt;setProperty(&amp;quot;FingerScrollable&amp;quot;, true); &lt;br /&gt;
&lt;br /&gt;
NOTE: Available in Qt &amp;gt; 4.5.3-xxxxx-maemo4&lt;br /&gt;
&lt;br /&gt;
====Hildon-Desktop widgets====&lt;br /&gt;
They are supported by Qt. An example (qt-example-hildondesktopwidget) is available in extras-devel.&lt;br /&gt;
&lt;br /&gt;
====Hildon menus====&lt;br /&gt;
Maemo5 menus are created using QActions available in menu bar. &lt;br /&gt;
Hidden, disabled, separators and widget actions won&#039;t shown. (Same in Qt 4.6)&lt;br /&gt;
&lt;br /&gt;
* qt-4.5.3-xxxx-maemo4 packages - needs QActions in a &amp;quot;fremantle&amp;quot; menu.&lt;br /&gt;
* Pkgs &amp;gt; qt-4.5.3-xxxx-maemo4 shows Maemo5 menus automatically&lt;br /&gt;
&lt;br /&gt;
Note: Maemo5 policy doesn&#039;t allow application to have more than 10 items.&lt;br /&gt;
&lt;br /&gt;
====Stackable windows====&lt;br /&gt;
http://maemomm.garage.maemo.org/docs/tutorial/figures/stackable-window.png&lt;br /&gt;
Are supported by Qt. To create them you need to create a MainWindow child of another Main window.&lt;br /&gt;
&lt;br /&gt;
 QMainWindow *fistStackableWindow = new QMainWindow;&lt;br /&gt;
 QMainWindow *secondStackableWindow = new QMainWindow(fistStackableWindow);&lt;br /&gt;
// you need the below line to see the back button on the top right hand corner of the stacked window instead of a cross&lt;br /&gt;
 secondStackableWindow-&amp;gt;setAttribute(Qt::WA_Maemo5StackedWindow);&lt;br /&gt;
&lt;br /&gt;
====Raise a Qt application in background====&lt;br /&gt;
QWidget::activateWindow() does the job.&lt;br /&gt;
&lt;br /&gt;
Implemented in Qt packages &amp;gt;= qt-4.5.3-xxxx-maemo6&lt;br /&gt;
==== How to minimize a Qt application? ====&lt;br /&gt;
 QDBusConnection c = QDBusConnection::sessionBus();&lt;br /&gt;
 QDBusMessage m = QDBusMessage::createSignal(&amp;quot;/&amp;quot;,&amp;quot;com.nokia.hildon_desktop&amp;quot;,&amp;quot;exit_app_view&amp;quot;);&lt;br /&gt;
 c.send(m);&lt;br /&gt;
&lt;br /&gt;
====Portrait mode and listening for orientation changes====&lt;br /&gt;
If you want to run your application in portrait mode then you can add these lines to your application. The code goes in your main widget constructor.&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
 //Includes for portrait mode support&lt;br /&gt;
 # include &amp;lt;X11/Xlib.h&amp;gt;&lt;br /&gt;
 # include &amp;lt;X11/Xatom.h&amp;gt;&lt;br /&gt;
 # include &amp;lt;QtGui/QX11Info&amp;gt;&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #ifndef Q_WS_HILDON&lt;br /&gt;
 int value = 1;&lt;br /&gt;
 Atom portraitSupport = XInternAtom(QX11Info::display(), &amp;quot;_HILDON_PORTRAIT_MODE_SUPPORT&amp;quot;, false);&lt;br /&gt;
 Atom portraitRequest = XInternAtom(QX11Info::display(), &amp;quot;_HILDON_PORTRAIT_MODE_REQUEST&amp;quot;, false);&lt;br /&gt;
 XChangeProperty(QX11Info::display(), winId(), portraitSupport, XA_CARDINAL, 32, PropModeReplace, (uchar *)&amp;amp;value, 1);&lt;br /&gt;
 XChangeProperty(QX11Info::display(), winId(), portraitRequest, XA_CARDINAL, 32, PropModeReplace, (uchar *)&amp;amp;value, 1);&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
If you want to listen for orientation changes and then switch the view to landscape or potrait mode automatically than take a look at [[Maemo_Qt_Extra_Libraries]] for more information.&lt;br /&gt;
&lt;br /&gt;
==== QDockWidgets ====&lt;br /&gt;
QDockWidgets are not finger friendly widgets. They should not be used in Maemo.&lt;br /&gt;
In case you are porting an application to Maemo maybe you want to do&lt;br /&gt;
few changes as possible into your UI. Then you could use QDockWidget::setFeatures(QDockWidget::NoDockWidgetFeatures); to hide float and close button and lock the position of the dock widget.&lt;br /&gt;
&lt;br /&gt;
==== QPrint* and QSystemTray support missing ==== &lt;br /&gt;
 Printing (QPrint*) and System tray support is missing in current&lt;br /&gt;
 Qt 4.5.3-xxxx-maemo4 packages.&lt;br /&gt;
 Since incompatibility with KDE and other Qt application, they will be enabled again in next Qt 4.5.3 packages.&lt;br /&gt;
&lt;br /&gt;
==== QSplashScreen not fully compatible with Hildon-Desktop ====&lt;br /&gt;
 QSplashScreen&#039;s window type is not supported in Fremantle. The splash screen is&lt;br /&gt;
 shown in full screen and the image is repeated to fill the splash screen&#039;s&lt;br /&gt;
 window. When splash screen is closed normal window closing animation is shown&lt;br /&gt;
 before showing the actual application window. For these reasons developers are&lt;br /&gt;
 disencouraged to use splash screens in their applications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FREMANTLE (Qt 4.6)===&lt;br /&gt;
Here an example that shows several maemo5 Qt widgets in Qt 4.6.&lt;br /&gt;
&lt;br /&gt;
http://qt.nokia.com/doc/qt-maemo-4.6/examples-maemo5.html&lt;br /&gt;
&lt;br /&gt;
http://qt.gitorious.org/+qt-developers/qt/x11-maemo/trees/986340bb5e4b69ceb0a959c2a067a1ed5e504d50/examples/maemo5/widgets&lt;br /&gt;
&lt;br /&gt;
====Finger Scrolling====&lt;br /&gt;
* Qt 4.6 tp2&lt;br /&gt;
 &amp;lt;s&amp;gt;QListView listView;&lt;br /&gt;
 new QMaemo5KineticScroller(&amp;amp;listView);&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;The ctor for QMaemo5KineticScroller for widgets seems protected now, hence the above cant be done.&lt;br /&gt;
So to have Kinetic Scrolling we can do this :&lt;br /&gt;
&lt;br /&gt;
 QAbstractScrollArea areaToScroll&lt;br /&gt;
 new QMaemo5KineticScroller(&amp;amp;areaToScroll);&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kinetic scrolling is *now* present by default in most scrolling widgets&lt;br /&gt;
eg. QTextBrowser, QTableView&lt;br /&gt;
&lt;br /&gt;
If you want to tweak the kinetic scrolling parameters like inertia and acceleration&lt;br /&gt;
then you can instaniate a QAbstractKineticScroller object like this.&lt;br /&gt;
&lt;br /&gt;
 QAbstractKineticScroller ks =  &lt;br /&gt;
   scrollArea-&amp;gt;property(&amp;quot;kineticScroller&amp;quot;).value&amp;lt;QAbstractKineticScroller *&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
where scrollArea could be QScrollArea with some widgets added to it&lt;br /&gt;
or you could use implementations like QTextBrowser&lt;br /&gt;
&lt;br /&gt;
you can tweak scrolling like this&lt;br /&gt;
 ks-&amp;gt;setDragInertia( (double)value / 100.0)&lt;br /&gt;
 ks-&amp;gt;setMode(QAbstractKineticScroller::PushMode)&lt;br /&gt;
 &lt;br /&gt;
etc... , refer to the examples here for details ==&amp;gt; [http://qt.gitorious.org/+qt-developers/qt/x11-maemo/blobs/4.6-fremantle/examples/maemo5/kineticscroller/main.cpp]&lt;br /&gt;
&lt;br /&gt;
====QSplashScreen====&lt;br /&gt;
Should be fixed in Qt 4.6. SplashWindow type is not supported by Fremantle WM. Qt 4.6 display splash screen using popup window type.&lt;br /&gt;
&lt;br /&gt;
====Orientation====&lt;br /&gt;
[http://qt.nokia.com/doc/qt-maemo-4.6/maemo5-rotation.html Official documentation]&lt;br /&gt;
====Maemo5 Readme file====&lt;br /&gt;
There is a README file in Qt 4.6 source tree. You could check it clicking [http://qt.gitorious.org/+qt-developers/qt/x11-maemo/blobs/4.6-fremantle/README.maemo5 Here].&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900+w34 origin/qt-n900+w34&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===QML===&lt;br /&gt;
http://wiki.maemo.org/QML&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34336</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34336"/>
		<updated>2009-11-04T13:10:21Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Installing the Qt packages in Scratchbox */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
That&#039;s not a big problem. You can run Maemo SDK in a virtual machine;&lt;br /&gt;
You can download Maemo SDK virtual Image (Linux Ubuntu + Diablo and Fremantle SDK)&lt;br /&gt;
from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com].&lt;br /&gt;
You can get VMPlayer from [http://www.vmware.com/products/player/ here].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
Maemo SDK can be installaed in any Linux environment.&lt;br /&gt;
However Debian based distros (eg: Ubuntu) are recommended.&lt;br /&gt;
&lt;br /&gt;
Documentation you need to install Maemo SDK is [http://maemo.org/development/sdks/ here].&lt;br /&gt;
&lt;br /&gt;
=== Installing Qt packages in Scratchbox ===&lt;br /&gt;
Maemo Qt developers offers a set of Qt packages for Diablo (Maemo4.1 - OS2008)&lt;br /&gt;
and Fremantle (Maemo5 - OS2009).&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
Diablo Qt packages are into the official Extras repository.&lt;br /&gt;
In order to start to develop with those packages you need to add&lt;br /&gt;
extras repository to your repository list.&lt;br /&gt;
&lt;br /&gt;
 1. Open /etc/apt/source.list with a text editor (eg: kate, gedit...)&lt;br /&gt;
 2. Append the following line to that file: &lt;br /&gt;
     deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 3. Then update your APT cache with&lt;br /&gt;
      &amp;lt;i&amp;gt;apt-get update&amp;lt;/i&amp;gt;&lt;br /&gt;
 4. Install Qt packages with&lt;br /&gt;
      &amp;lt;i&amp;gt;apt-get install libqt4-dev&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
Fremantle packages are already available into the Fremantle final SDK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [[Qt/Benchmark/qgear|QGears]]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900 origin/qt-n900&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to minimize a Qt application? ==&lt;br /&gt;
 QDBusConnection c = QDBusConnection::sessionBus();&lt;br /&gt;
 QDBusMessage m = QDBusMessage::createSignal(&amp;quot;/&amp;quot;,&amp;quot;com.nokia.hildon_desktop&amp;quot;,&amp;quot;exit_app_view&amp;quot;);&lt;br /&gt;
 c.send(m);&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34337</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34337"/>
		<updated>2009-11-04T13:01:53Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Installing the Maemo SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
That&#039;s not a big problem. You can run Maemo SDK in a virtual machine;&lt;br /&gt;
You can download Maemo SDK virtual Image (Linux Ubuntu + Diablo and Fremantle SDK)&lt;br /&gt;
from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com].&lt;br /&gt;
You can get VMPlayer from [http://www.vmware.com/products/player/ here].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
Maemo SDK can be installaed in any Linux environment.&lt;br /&gt;
However Debian based distros (eg: Ubuntu) are recommended.&lt;br /&gt;
&lt;br /&gt;
Documentation you need to install Maemo SDK is [http://maemo.org/development/sdks/ here].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
Fremantle packages are already available into the Fremantle final SDK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [[Qt/Benchmark/qgear|QGears]]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900 origin/qt-n900&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to minimize a Qt application? ==&lt;br /&gt;
 QDBusConnection c = QDBusConnection::sessionBus();&lt;br /&gt;
 QDBusMessage m = QDBusMessage::createSignal(&amp;quot;/&amp;quot;,&amp;quot;com.nokia.hildon_desktop&amp;quot;,&amp;quot;exit_app_view&amp;quot;);&lt;br /&gt;
 c.send(m);&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34338</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34338"/>
		<updated>2009-11-04T12:26:52Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Hey, I don&amp;#039;t have a Linux machine! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
That&#039;s not a big problem. You can run Maemo SDK in a virtual machine;&lt;br /&gt;
You can download Maemo SDK virtual Image (Linux Ubuntu + Diablo and Fremantle SDK)&lt;br /&gt;
from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com].&lt;br /&gt;
You can get VMPlayer from [http://www.vmware.com/products/player/ here].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
Fremantle packages are already available into the Fremantle final SDK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [[Qt/Benchmark/qgear|QGears]]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900 origin/qt-n900&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to minimize a Qt application? ==&lt;br /&gt;
 QDBusConnection c = QDBusConnection::sessionBus();&lt;br /&gt;
 QDBusMessage m = QDBusMessage::createSignal(&amp;quot;/&amp;quot;,&amp;quot;com.nokia.hildon_desktop&amp;quot;,&amp;quot;exit_app_view&amp;quot;);&lt;br /&gt;
 c.send(m);&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34339</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34339"/>
		<updated>2009-11-03T14:35:23Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Fremantle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
Fremantle packages are already available into the Fremantle final SDK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [[Qt/Benchmark/qgear|QGears]]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900 origin/qt-n900&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to minimize a Qt application? ==&lt;br /&gt;
 QDBusConnection c = QDBusConnection::sessionBus();&lt;br /&gt;
 QDBusMessage m = QDBusMessage::createSignal(&amp;quot;/&amp;quot;,&amp;quot;com.nokia.hildon_desktop&amp;quot;,&amp;quot;exit_app_view&amp;quot;);&lt;br /&gt;
 c.send(m);&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34341</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34341"/>
		<updated>2009-10-28T16:29:46Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* How to minimize a Qt application? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ fremantle free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ fremantle free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [[Qt/Benchmark/qgear|QGears]]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900 origin/qt-n900&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to minimize a Qt application? ==&lt;br /&gt;
 QDBusConnection c = QDBusConnection::sessionBus();&lt;br /&gt;
 QDBusMessage m = QDBusMessage::createSignal(&amp;quot;/&amp;quot;,&amp;quot;com.nokia.hildon_desktop&amp;quot;,&amp;quot;exit_app_view&amp;quot;);&lt;br /&gt;
 c.send(m);&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34342</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34342"/>
		<updated>2009-10-28T16:28:53Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Is it yet possible to create Fremantle desktop widgets using Qt? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ fremantle free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ fremantle free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [[Qt/Benchmark/qgear|QGears]]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900 origin/qt-n900&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to minimize a Qt application? ==&lt;br /&gt;
QDBusConnection c = QDBusConnection::sessionBus();&lt;br /&gt;
QDBusMessage m = QDBusMessage::createSignal(&amp;quot;/&amp;quot;,&amp;quot;com.nokia.hildon_desktop&amp;quot;,&amp;quot;exit_app_view&amp;quot;);&lt;br /&gt;
c.send(m);&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34802</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34802"/>
		<updated>2009-10-19T09:27:39Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Intro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
Fremantle Qt lives in gitorious.&lt;br /&gt;
Currently there are 2 different versions of Qt:&lt;br /&gt;
* Community port, based on Qt 4.5&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Official port based on Qt 4.6&lt;br /&gt;
   http://qt.gitorious.org/qt/qt-x11-maemo&lt;br /&gt;
&lt;br /&gt;
The pages you are browsing now are related to the community port of Qt.&lt;br /&gt;
If you want to know more about the official Qt port, please cheek this page:&lt;br /&gt;
  http://qt.nokia.com/developer/qt-for-maemo-developers?gclid=CMDrwanfyJ0CFdQq3god12S7sA&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Community Qt 4.5 port =&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 4.5-diablo ===&lt;br /&gt;
=== 4.5-fremantle ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-n900 ===&lt;br /&gt;
is the current Fremantle branch.&lt;br /&gt;
* It&#039;s a branch of internal Qt 4.5.3 repository&lt;br /&gt;
* It contains changes also available in 4.5-fremantle&lt;br /&gt;
* currently it creates packages 4.5.3-maemo4.1 compatibile that can be installed into the device without overriding pre-install Qt core pacakges.&lt;br /&gt;
* for more information ask to Antonio&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks master-maemo-qt-4.5&lt;br /&gt;
It contains common packaging that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backporting 4.6 commits to our 4.5 branch ==&lt;br /&gt;
If we need to take some fixes from master 4.6 Qt branch, we have to cherry pick from our master branch to the 4.6-backports and master-qt-4.5 branches.&lt;br /&gt;
&lt;br /&gt;
This branch is marked in yellow in the diagram&lt;br /&gt;
&lt;br /&gt;
===List of backported changes===&lt;br /&gt;
This list make the backported changes more visible to Maemo Qt application developers.&lt;br /&gt;
&lt;br /&gt;
This list is updated every time that the the backport branch is updated.&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer, please update the the list with the git log output. &lt;br /&gt;
[[Qt_Maemo_backported4.6Commits]]&lt;br /&gt;
&lt;br /&gt;
===Request for merging 4.6 changes in Maemo Qt===&lt;br /&gt;
You can request it sending a mail in our ML.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches should be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34803</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34803"/>
		<updated>2009-10-19T09:26:46Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
The Fremantle version of Qt lives in gitorious.&lt;br /&gt;
Currently there are 2 different versions of Qt:&lt;br /&gt;
* Community port, based on Qt 4.5&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Official port based on Qt 4.6&lt;br /&gt;
   http://qt.gitorious.org/qt/qt-x11-maemo&lt;br /&gt;
&lt;br /&gt;
The pages you are browsing now are related to the community port of Qt.&lt;br /&gt;
If you want to know more about the official Qt port, please cheek this page:&lt;br /&gt;
  http://qt.nokia.com/developer/qt-for-maemo-developers?gclid=CMDrwanfyJ0CFdQq3god12S7sA&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Community Qt 4.5 port =&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 4.5-diablo ===&lt;br /&gt;
=== 4.5-fremantle ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-n900 ===&lt;br /&gt;
is the current Fremantle branch.&lt;br /&gt;
* It&#039;s a branch of internal Qt 4.5.3 repository&lt;br /&gt;
* It contains changes also available in 4.5-fremantle&lt;br /&gt;
* currently it creates packages 4.5.3-maemo4.1 compatibile that can be installed into the device without overriding pre-install Qt core pacakges.&lt;br /&gt;
* for more information ask to Antonio&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks master-maemo-qt-4.5&lt;br /&gt;
It contains common packaging that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backporting 4.6 commits to our 4.5 branch ==&lt;br /&gt;
If we need to take some fixes from master 4.6 Qt branch, we have to cherry pick from our master branch to the 4.6-backports and master-qt-4.5 branches.&lt;br /&gt;
&lt;br /&gt;
This branch is marked in yellow in the diagram&lt;br /&gt;
&lt;br /&gt;
===List of backported changes===&lt;br /&gt;
This list make the backported changes more visible to Maemo Qt application developers.&lt;br /&gt;
&lt;br /&gt;
This list is updated every time that the the backport branch is updated.&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer, please update the the list with the git log output. &lt;br /&gt;
[[Qt_Maemo_backported4.6Commits]]&lt;br /&gt;
&lt;br /&gt;
===Request for merging 4.6 changes in Maemo Qt===&lt;br /&gt;
You can request it sending a mail in our ML.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches should be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34804</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34804"/>
		<updated>2009-10-19T09:17:46Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* qt-fremantle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 4.5-diablo ===&lt;br /&gt;
=== 4.5-fremantle ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-n900 ===&lt;br /&gt;
is the current Fremantle branch.&lt;br /&gt;
* It&#039;s a branch of internal Qt 4.5.3 repository&lt;br /&gt;
* It contains changes also available in 4.5-fremantle&lt;br /&gt;
* currently it creates packages 4.5.3-maemo4.1 compatibile that can be installed into the device without overriding pre-install Qt core pacakges.&lt;br /&gt;
* for more information ask to Antonio&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks master-maemo-qt-4.5&lt;br /&gt;
It contains common packaging that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backporting 4.6 commits to our 4.5 branch ==&lt;br /&gt;
If we need to take some fixes from master 4.6 Qt branch, we have to cherry pick from our master branch to the 4.6-backports and master-qt-4.5 branches.&lt;br /&gt;
&lt;br /&gt;
This branch is marked in yellow in the diagram&lt;br /&gt;
&lt;br /&gt;
===List of backported changes===&lt;br /&gt;
This list make the backported changes more visible to Maemo Qt application developers.&lt;br /&gt;
&lt;br /&gt;
This list is updated every time that the the backport branch is updated.&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer, please update the the list with the git log output. &lt;br /&gt;
[[Qt_Maemo_backported4.6Commits]]&lt;br /&gt;
&lt;br /&gt;
===Request for merging 4.6 changes in Maemo Qt===&lt;br /&gt;
You can request it sending a mail in our ML.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches should be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34344</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34344"/>
		<updated>2009-10-06T15:32:16Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Debugging a Qt application on device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ fremantle free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ fremantle free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If necessary you can put break points; eg: for void QWidget::setPalette ( const QPalette &amp;amp; )&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) break QWidget::setPalette(QPalette const&amp;amp;)&lt;br /&gt;
 Breakpoint 1 at 0x4026ae68&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.maemo.org/Qt/Benchmark/qgear QGears]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-n900 origin/qt-n900&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34346</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34346"/>
		<updated>2009-10-01T09:18:01Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Where are the Hildon Widgets for Qt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
==== Diablo ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
==== Fremantle ====&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ fremantle free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ fremantle free&amp;quot; &amp;gt; /etc/apt/sources.list.d/qt.list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for each of the DIABLO_X86, FREMANTLE_X86, DIABLO_ARMEL, FREMANTLE_ARMEL targets that you plan to build on.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
Currently Qt Maemo lacks full support for Hildon widgets introduced in Maemo 5. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;At the moment, creating a Qt application that follows Maemo 5 UI Style requires using custom Qt widgets, coded within the application itself&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There is work ongoing to provide Qt Hildon widgets for Maemo 5, see [http://wiki.maemo.org/Qt4_Hildon/Qt_Hildon_Widgets Qt Hildon Widgets]&lt;br /&gt;
&lt;br /&gt;
To get the benefits of the ongoing Maemo 5 hildon integration work in Qt, you must get the latest Qt source code and compile it yourself. See [http://wiki.maemo.org/Qt4_Hildon#Building_Qt_from_GIT_rep Building Qt from GIT repository].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.maemo.org/Qt/Benchmark/qgear QGears]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Make sure each scratchbox target has&lt;br /&gt;
&lt;br /&gt;
  fakeroot apt-get build-dep libqt4-gui&lt;br /&gt;
&lt;br /&gt;
(you may need to apt-get install libgl-dev too as it&#039;s not in the Build-Depends: yet)&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-fremantle origin/qt-fremantle&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on N900===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
===Where are the Hildon Widgets for Qt===&lt;br /&gt;
Short answer : they&#039;ve not been written.... yet.&lt;br /&gt;
&lt;br /&gt;
Qt allows you to create your own widgets very easily. However, in order to provide as consistent an appearance as possible for the Maemo platform the community will be creating a set of [[/Qt Hildon Widgets|Qt Hildon Widgets]]&lt;br /&gt;
&lt;br /&gt;
===Is it yet possible to create Fremantle desktop widgets using Qt?===&lt;br /&gt;
Since desktop applet are libraries (.so files) then it&#039;s not so simple making Qt desktop applet.&lt;br /&gt;
&lt;br /&gt;
At moment I didn&#039;t investigate for a solution.. but it&#039;s possible (I tried it) to put Qt Widgets into the desktop just changing the Window Type of the widget (eg a QDialog) with the right Window Type.&lt;br /&gt;
&lt;br /&gt;
Then a Qt application can put widgets in the hildon-desktop but the &amp;quot;applet manager&amp;quot; that loads the desktop widgets doesn&#039;t recognize them as applet, then it doesn&#039;t manage Qt home applets.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34367</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34367"/>
		<updated>2009-08-19T11:26:51Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Maemo Qt API Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog and install Qt libraries:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application to Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Using the Kinetic Finger Scrolling (cf Gtk&#039;s PannableArea)====&lt;br /&gt;
See [[Qt/Finger Scrolling|Finger Scrolling]]&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Qt benchmarks ==&lt;br /&gt;
2D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.maemo.org/Qt/Benchmark/qgear QGears]&lt;br /&gt;
3D graphic benchmark tools:&lt;br /&gt;
&lt;br /&gt;
* TODO&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QPrinter and QPrintDialog&#039;&#039;&#039;&lt;br /&gt;
   Print support has been removed from Maemo Qt.&lt;br /&gt;
   Application compiled with old libs are still binary compatible with the new libs but they crash when a removed component is called.&lt;br /&gt;
 &lt;br /&gt;
   Nokia: /home/user# ./textedit &lt;br /&gt;
./textedit: symbol lookup error: ./textedit: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;System tray support&#039;&#039;&#039;&lt;br /&gt;
   System tray is not available anymore in Fremantle. That support has been removed from Qt too.&lt;br /&gt;
   Hence QSystemTrayIcon class is not available anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5 origin/4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-fremantle origin/qt-fremantle&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Checking out all the remote branches===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Change dir&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
&lt;br /&gt;
* Check out our script branch &lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
&lt;br /&gt;
* Save a copy of the script outside the working directories&lt;br /&gt;
 cp maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh ../&lt;br /&gt;
&lt;br /&gt;
* Launch the copy.sh script&lt;br /&gt;
 ../copy.sh&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
=== I installed Qt (libqt4-dev) to scratchbox and tried to build a sample application, but I got the error because some header files such as qhildonstyle.h, and qvfbhdr.h etc. were missing. ===&lt;br /&gt;
&lt;br /&gt;
libqt4-dev should copy all header files, but now, at least in 4.5.2-1maemo1, some files are missing. Please download file below and extract to your scratchbox system.&lt;br /&gt;
&lt;br /&gt;
http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&lt;br /&gt;
&lt;br /&gt;
===Installing Qt on NXXX===&lt;br /&gt;
If you have already a fremantle device then you can install new Qt packages from extras-devel.&lt;br /&gt;
The step to follow are:&lt;br /&gt;
* Free space&lt;br /&gt;
* echo &amp;quot;deb http://repository.maemo.org/extras-devel/ fremantle free non-free&lt;br /&gt;
&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/hildon-application-manager.list&lt;br /&gt;
* apt-get install libqt4-gui&lt;br /&gt;
The basic packages will be so installed.&lt;br /&gt;
&lt;br /&gt;
Current known issues:&lt;br /&gt;
*  libqt4-opengl depends by libgles2, but it is not installable anymore.Has it been replaced with libgles2-sgx-img?&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34809</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34809"/>
		<updated>2009-07-02T09:18:41Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Backporting 4.6 commits to our 4.5 branch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch. debian/ dir is not there yet. Hence you cannot build deb packages. Ask to Antonio for more info about it.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks master-maemo-qt-4.5&lt;br /&gt;
It contains common packaging that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backporting 4.6 commits to our 4.5 branch ==&lt;br /&gt;
If we need to take some fixes from master 4.6 Qt branch, we have to cherry pick from our master branch to the 4.6-backports and master-qt-4.5 branches.&lt;br /&gt;
&lt;br /&gt;
This branch is marked in yellow in the diagram&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34810</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34810"/>
		<updated>2009-07-02T09:17:59Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Backporting 4.6 commits to our 4.5 branch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch. debian/ dir is not there yet. Hence you cannot build deb packages. Ask to Antonio for more info about it.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks master-maemo-qt-4.5&lt;br /&gt;
It contains common packaging that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backporting 4.6 commits to our 4.5 branch ==&lt;br /&gt;
If we need to take some fixes from master 4.6 Qt branch, we cherry pick from our master branch to the 4.6-backports and master-qt-4.5 branches.&lt;br /&gt;
&lt;br /&gt;
This branch is marked in yellow in the diagram&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34811</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34811"/>
		<updated>2009-07-02T09:08:04Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Maemo fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch. debian/ dir is not there yet. Hence you cannot build deb packages. Ask to Antonio for more info about it.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks master-maemo-qt-4.5&lt;br /&gt;
It contains common packaging that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backporting 4.6 commits to our 4.5 branch ==&lt;br /&gt;
Those commits will be in the 4.6-backports branch. In the Diagram it&#039;s in yellow.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34391</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34391"/>
		<updated>2009-07-02T07:14:07Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Running a Qt application on device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on the device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
===Getting the code (with branches) from the GIT repository===&lt;br /&gt;
Our repository has different branches. If want to have all of them&lt;br /&gt;
in your working copy, we wrote a script that help you to do this job.&lt;br /&gt;
&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
 ./maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5          origin/qt-4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-fremantle origin/qt-fremantle&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
 When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34392</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34392"/>
		<updated>2009-07-02T07:07:06Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Introduction to Git */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
===Getting the code (with branches) from the GIT repository===&lt;br /&gt;
Our repository has different branches. If want to have all of them&lt;br /&gt;
in your working copy, we wrote a script that help you to do this job.&lt;br /&gt;
&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
 ./maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5          origin/qt-4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-fremantle origin/qt-fremantle&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
 When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34393</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34393"/>
		<updated>2009-07-02T07:05:51Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Merging branches changes in the mainline [OLD] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
&amp;lt;b&amp;gt;Getting started with Git&amp;lt;/b&amp;gt;&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
===Getting the code (with branches) from the GIT repository===&lt;br /&gt;
Our repository has different branches. If want to have all of them&lt;br /&gt;
in your working copy, we wrote a script that help you to do this job.&lt;br /&gt;
&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
 ./maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5          origin/qt-4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-fremantle origin/qt-fremantle&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
 When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34394</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34394"/>
		<updated>2009-07-02T07:04:56Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Building Qt from GIT rep */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
&amp;lt;b&amp;gt;Getting started with Git&amp;lt;/b&amp;gt;&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
===Getting the code (with branches) from the GIT repository===&lt;br /&gt;
Our repository has different branches. If want to have all of them&lt;br /&gt;
in your working copy, we wrote a script that help you to do this job.&lt;br /&gt;
&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
 ./maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5          origin/qt-4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-fremantle origin/qt-fremantle&lt;br /&gt;
 git checkout -b qt-mer       origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
 When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34395</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34395"/>
		<updated>2009-07-02T07:04:05Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Contributing to the Maemo Qt Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
You can run a Qt application in both the target supported by scratchbox (ARMEL, X86).&lt;br /&gt;
However using the X86 target is recommended.&lt;br /&gt;
&lt;br /&gt;
Before running the application you have to start Xephyr outside Scratchbox with the following parameters:&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite&lt;br /&gt;
&lt;br /&gt;
In the Scratchbox environment the DISPLAY variable has to be set so that it matches the display setting given above for the Xephyr server (parameter :2 in the above example).&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
After the Xephyr server is running on the Linux host, you can start the Hildon Application Framework with the following command:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
This should start the Hildon Application Framework inside the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
Now we are ready to run an application in scratchbox:&lt;br /&gt;
&lt;br /&gt;
 [sbox-DIABLO_&amp;lt;target&amp;gt;:~] &amp;gt; run-standalone.sh ./qtapps&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
Here there is a list of things that every person interested in helping us should read.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
BTW the mailing list is not for Maemo Qt Developers but it&#039;s open to Maemo Qt application developers too.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to Git ===&lt;br /&gt;
&amp;lt;b&amp;gt;Getting started with Git&amp;lt;/b&amp;gt;&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Understanding the structure of our Git repository===&lt;br /&gt;
These info are here:[[Qt Maemo Git Process]].&lt;br /&gt;
&lt;br /&gt;
===Getting the code (with branches) from the GIT repository===&lt;br /&gt;
Our repository has different branches. If want to have all of them&lt;br /&gt;
in your working copy, we wrote a script that help you to do this job.&lt;br /&gt;
&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
 cd qt-maemo&lt;br /&gt;
 git checkout -b maemo-qt-scripts origin/maemo-qt-scripts&lt;br /&gt;
 ./maemo-qt-scripts/copy-all-remote-branches-locally/copy.sh&lt;br /&gt;
&lt;br /&gt;
===Building Qt from GIT rep===&lt;br /&gt;
* Clone the repository:&lt;br /&gt;
 git clone git://gitorious.org/+qt-maemo-developers/qt/qt-maemo.git &lt;br /&gt;
or if you are a member of our team:&lt;br /&gt;
 git clone git@gitorious.org:+qt-maemo-developers/qt/qt-maemo.git&lt;br /&gt;
&lt;br /&gt;
* Copy the remote 4.5 branch in your workingcopy&lt;br /&gt;
 git checkout -b 4.5          origin/qt-4.5&lt;br /&gt;
&lt;br /&gt;
* Checkout ONE of these branches: &lt;br /&gt;
 git checkout -b qt-diablo    origin/qt-diablo&lt;br /&gt;
 git checkout -b qt-fremantle origin/qt-fremantle&lt;br /&gt;
 git checkout -b qt-mer origin/qt-mer&lt;br /&gt;
&lt;br /&gt;
* Build the packages:&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN [OLD]===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branches changes in the mainline [OLD]===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
 When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34812</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34812"/>
		<updated>2009-06-30T07:18:14Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* maemo-build-generic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch. debian/ dir is not there yet. Hence you cannot build deb packages. Ask to Antonio for more info about it.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks master-maemo-qt-4.5&lt;br /&gt;
It contains common packaging that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34813</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34813"/>
		<updated>2009-06-30T07:16:45Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Maemo build branches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release.&lt;br /&gt;
&lt;br /&gt;
These are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
If you are looking for building Qt from sources for a specific platform, then you have to checkout one of these branches and run &lt;br /&gt;
 dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch. debian/ dir is not there yet. Hence you cannot build deb packages. Ask to Antonio for more info about it.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks ??(I suggest master-maemo-qt-4.5)&lt;br /&gt;
It contains common packaging (ie debian/*) that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34814</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34814"/>
		<updated>2009-06-30T07:11:05Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* master-maemo-qt-45 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is &lt;br /&gt;
* based on 4.5&lt;br /&gt;
* has all feature branches selected for maemo merged into it.&lt;br /&gt;
* fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release. There are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch, but this is not ready yet.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks ??(I suggest master-maemo-qt-4.5)&lt;br /&gt;
It contains common packaging (ie debian/*) that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34815</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34815"/>
		<updated>2009-06-29T12:06:31Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* maemo-* */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is based on 4.5 and has all feature branches selected for maemo merged into it.&lt;br /&gt;
Note that this branch is fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release. There are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch, but this is not ready yet.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks ??(I suggest master-maemo-qt-4.5)&lt;br /&gt;
It contains common packaging (ie debian/*) that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-* &lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
These branches has been created just to store the changes. We don&#039;t need to merge the changes from the 4.5 branch here if is not strictly needed.&lt;br /&gt;
Don&#039;t merging upstream changes in these branches make more visible the Maemo changes.&lt;br /&gt;
Then The 4.5 branch WON&#039;T be merged into them to keep them up-to-date.&lt;br /&gt;
The branch will be there and updated with our changes also when the feature is adopted upstream.&lt;br /&gt;
Usually is hard to track dependencies between branches. The Diagram below should explain these dependencies.&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34816</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34816"/>
		<updated>2009-06-29T11:04:02Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* maemo-* */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is based on 4.5 and has all feature branches selected for maemo merged into it.&lt;br /&gt;
Note that this branch is fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release. There are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch, but this is not ready yet.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks ??(I suggest master-maemo-qt-4.5)&lt;br /&gt;
It contains common packaging (ie debian/*) that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
 - maemo-build-*&lt;br /&gt;
 - maemo-qt-scripts&lt;br /&gt;
 - others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34817</id>
		<title>Qt Maemo Git Process</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt_Maemo_Git_Process&amp;diff=34817"/>
		<updated>2009-06-29T11:03:07Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Maemo fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Maemo version of Qt lives here:&lt;br /&gt;
  http://gitorious.org/+qt-maemo-developers/qt/qt-maemo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a local clone you can use &amp;lt;code&amp;gt;gitk --all&amp;lt;/code&amp;gt; to see a visual representation of the branches, commits and merges.&lt;br /&gt;
&lt;br /&gt;
lbt proposed this explanation of the branches/workflow based on the [[Mer/Build/UsingGitorious|Mer gitorious workflow]]&lt;br /&gt;
&lt;br /&gt;
== Origin ==&lt;br /&gt;
The branches are synced with upstream Qt changes. No Maemo changes are there at all.&lt;br /&gt;
=== master ===&lt;br /&gt;
represents the latest core Qt master branch (currently 4.6)&lt;br /&gt;
=== 4.5 ===&lt;br /&gt;
represents the latest core Qt branch for 4.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo master branches ==&lt;br /&gt;
Currently we have 4.5 master branch only.&lt;br /&gt;
&lt;br /&gt;
=== master-maemo-qt-45 ===&lt;br /&gt;
This branch is based on 4.5 and has all feature branches selected for maemo merged into it.&lt;br /&gt;
Note that this branch is fairly plain Qt and should contains no packaging data and debian/* should not exist.&lt;br /&gt;
&lt;br /&gt;
If an updates is made to 4.5 and 4.5 is merged into master-maemo-qt-4.5 then *all* conflicts with all feature/bug branches will be seen at once.&lt;br /&gt;
To avoid this, 4.5 is merged into each bug/feature branch and conflicts resolved in focused feature areas.&lt;br /&gt;
Now we need to merge the conflict-resolved features into master-maemo-qt-4.5.&lt;br /&gt;
At this point it may seem reasonable to simply re-merge each feature branch into master-maemo-qt-4.5 however master-maemo-qt-4.5 contains all the other features from the last merge. So as soon as the first conflict-resolved feature is merged, all the conflicts from all the other features will be hit.&lt;br /&gt;
The answer is to create a temporary local branch based on the latest 4.5 (see http://wiki.maemo.org/Mer/Build/UsingGitorious#Upstream_Updates) and merge each feature in turn into this branch. Then merge that into master-maemo-qt-4.5 (which should have no conflicts at all and, in the absence of any features/bugs is a simple fast-forward).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo build branches ==&lt;br /&gt;
These branch should be built completely and used for regular release. There are based on master-maemo-qt-45 currently.&lt;br /&gt;
&lt;br /&gt;
=== qt-diablo ===&lt;br /&gt;
Diablo branch&lt;br /&gt;
&lt;br /&gt;
=== qt-fremantle ===&lt;br /&gt;
Fremantle branch, but this is not ready yet.&lt;br /&gt;
&lt;br /&gt;
=== qt-mer ===&lt;br /&gt;
Currently there is no branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo build script and debian folder ==&lt;br /&gt;
=== maemo-build-generic ===&lt;br /&gt;
This branch is based on and tracks ??(I suggest master-maemo-qt-4.5)&lt;br /&gt;
It contains common packaging (ie debian/*) that allows Qt to build on various maemo-ish releases.&lt;br /&gt;
A good rule is that no code is touched by non-merge commits to this branch&lt;br /&gt;
It simply merges master-maemo-qt-4.5&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-diablo ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for diablo&lt;br /&gt;
Note that maemo-build-diablo is not merged back&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-fremantle ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for fremantle&lt;br /&gt;
&lt;br /&gt;
=== maemo-build-mer ===&lt;br /&gt;
Branched from maemo-build-generic and modified with packaging/configuration specifically used for Mer &lt;br /&gt;
&lt;br /&gt;
=== maemo-qt-scripts ===&lt;br /&gt;
There are some scripts to manage maemo branches or create release pacakge etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maemo fixes ==&lt;br /&gt;
These branches have each feature/ bug fix only. In the future, we will create a new maemo master branch, e.g. based on 4.6, at that time it is easy to chery-pick the modification to the new master branch.&lt;br /&gt;
&lt;br /&gt;
=== bug-* ===&lt;br /&gt;
Representing potential bugs in Qt&lt;br /&gt;
These branches hold fixes to specific bugs.&lt;br /&gt;
The 4.5 branch will be merged into them to keep them up-to-date. If the bug is fixed upstream the branch will be deleted.&lt;br /&gt;
&lt;br /&gt;
=== hildon-* ===&lt;br /&gt;
Each of these branches contain changes able to integrate Qt in the hildon environment. (Input method, menus, style).&lt;br /&gt;
TO FIX: Actually the widget-* branches shoul be renamed in hildon-widget-*&lt;br /&gt;
&lt;br /&gt;
=== hw-* ===&lt;br /&gt;
Contain changes that improve the usability of Qt with touchscreen device.&lt;br /&gt;
Feature like right mouse button emulation, easy double click and so on.&lt;br /&gt;
TO FIX: Actually the ts-* branches should be renamed in hw-ts-*&lt;br /&gt;
&lt;br /&gt;
=== maemo-* ===&lt;br /&gt;
Representing features in various areas and branched from cloned 4.5 branch.&lt;br /&gt;
Each branches adds only one feature-area.&lt;br /&gt;
&lt;br /&gt;
The main covered areas are:&lt;br /&gt;
- maemo-build-*&lt;br /&gt;
- maemo-qt-scripts&lt;br /&gt;
- others maemo related areas.&lt;br /&gt;
&lt;br /&gt;
[[Image:MaemoQtOnGit-Diagram-opt2.jpg]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34399</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34399"/>
		<updated>2009-06-22T07:17:17Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Maemo Qt API Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform Maemo Platform on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Hildon Hildon on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://live.gnome.org/Hildon Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* Share your application project in the [http://garage.maemo.org Garage].&lt;br /&gt;
* Make your application easy to install and put in the [[Extras]].&lt;br /&gt;
* Once your application has a high quality - be promoted to the [http://www.nokia.com/os2008 Nokia user site].&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Maemo_Platform#Maemo_SDK Maemo SDK on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Scratchbox Scratchbox on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.scratchbox.org/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK on a Linux machine.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a Linux machine! ===&lt;br /&gt;
&lt;br /&gt;
That&#039;s not a big problem. [http://maemovmware.garage.maemo.org/ Maemo SDK Virtual Image project] provides a virtual development image for the Maemo platform that can be used with [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
&lt;br /&gt;
See the [http://maemo.org/development/sdks/ SDK documentation] for details on installing the SDK. &lt;br /&gt;
&lt;br /&gt;
If you are on a non-debian system such as openSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in in order to get ARM CPU emulation working:&lt;br /&gt;
&lt;br /&gt;
 sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
&lt;br /&gt;
After Scratchbox and the SDK are installed and working, you need to login, add the [[Extras]] and [[Extras#Extras-devel|Extras-devel]] repositories to your apt-get sources and install the Qt libs. Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
 deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
 deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
 deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Then run these commands to update the catalog:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt; apt-get update&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
 &amp;gt; fakeroot apt-get install libqt4-dev&lt;br /&gt;
&lt;br /&gt;
Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both.&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application on device===&lt;br /&gt;
&lt;br /&gt;
To run a Qt application into the device, we need to copy it there.&lt;br /&gt;
&lt;br /&gt;
====Installing OpenSSH server on the device====&lt;br /&gt;
&lt;br /&gt;
To install and run applications on the device, we&#039;ll need to install an [[SSH]] server.&lt;br /&gt;
&lt;br /&gt;
* Open the Application Manager.&lt;br /&gt;
* Make sure [[Extras]] is enabled.&lt;br /&gt;
* Install openssh-server from the list.&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
&lt;br /&gt;
We can connect to device to our working machine via WLAN or USB. Connecting the device to a WLAN is quite easy, but [[USB networking]] is more difficult to set up.&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy scp] or secure copy is a common Linux application. It can copy files or a directories over a secure connection. To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
&lt;br /&gt;
Now that the application has been copied onto the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This because the Maemo Qt libraries will take care of giving the Hildon look &amp;amp; Feel and enabling the virtual input methods for your application.&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt Maemo changes===&lt;br /&gt;
&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
&lt;br /&gt;
The Maemo style is the default style of Qt applications on Maemo. The other styles available in Qt 4.4 Maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next release of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several ways:&lt;br /&gt;
&lt;br /&gt;
* Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;HINT: You can put this flag in the Exec field of the desktop file that launch the application.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
* If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
* If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
&lt;br /&gt;
Hildon applications don&#039;t have a status bar. Qt for Maemo hides the status bar by default.&lt;br /&gt;
You can show it again by modifying your code.&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs, so a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK. To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
&lt;br /&gt;
====Intro ====&lt;br /&gt;
&lt;br /&gt;
The GNU Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application in Scratchbox====&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application on device====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Installing gdb on the device.&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the [http://maemo.org/development/tools/ SDK tools] repository to the catalogue list.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;install gdb by using apt-get (require around 6 MB of space)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the debug symbols files in scratchbox (ARMEL target)&amp;lt;/li&amp;gt;&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&amp;lt;li&amp;gt;Run the application (device side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Run the gdb client on your host PC (scratchbox side)&amp;lt;/li&amp;gt;&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&amp;lt;li&amp;gt;Set the target of gdb&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&amp;lt;li&amp;gt;Tell to gdb to continue to debug the application on the device&amp;lt;/li&amp;gt;&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&amp;lt;li&amp;gt;Wait some moments...&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your application will appear on the device screen. Happy debugging!&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; tutorials]&lt;br /&gt;
* [http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
* [http://maemo.org/maemo_release_documentation/maemo4.1.x/node15.html Maemo debugging guide]&lt;br /&gt;
* [http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
&lt;br /&gt;
OProfile is a low overhead system-wide profiler for Linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo see the [http://maemo.org/development/tools/doc/chinook/oprofile/ documentation].&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging a Qt application}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, Mac OS X, Linux, S60, etc.) can run also into the Maemo devices. To Develop a Qt application you can use the [http://doc.trolltech.com/4.5/index.html Official Qt 4.5 API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
   &#039;&#039;&#039;QDialogs in fremantle.&#039;&#039;&#039;&lt;br /&gt;
   The fremantle WM doesn&#039;t allow QDialogs without a parent (at least this is true for Qt apps).&lt;br /&gt;
   A dialog without a parent won&#039;t be shown by the WM.&lt;br /&gt;
   &lt;br /&gt;
   Eg:&lt;br /&gt;
   This is what you MUST avoid. &lt;br /&gt;
   QColorDialog::getColor ( Qt::white, 0 )&lt;br /&gt;
   &lt;br /&gt;
   Remember to setup a parent&lt;br /&gt;
   QColorDialog::getColor ( Qt::white, this )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN===&lt;br /&gt;
&lt;br /&gt;
If you are a Maemo Qt developer and you want to save your changes in the Garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
===Merging branche changes in the mainline===&lt;br /&gt;
&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
&lt;br /&gt;
 Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
&lt;br /&gt;
=== Using Git ===&lt;br /&gt;
We started to move out our repository from SVN to GIT.&lt;br /&gt;
If you are a git newbie you maybe find interesting these links:&lt;br /&gt;
&lt;br /&gt;
* http://www.sourcemage.org/Git_Guide&lt;br /&gt;
* http://www.gitcasts.com/&lt;br /&gt;
* http://www.gnome.org/~newren/eg/git-for-svn-users.html&lt;br /&gt;
* Using the git protocol through a HTTP CONNECT proxy: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using x86 include files, then you have to update your Makefile. Running &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt; before &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a Qt packcage for x86, but I got the error below. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
 In file included from maemo/gconfsymbols.cpp:41:&lt;br /&gt;
 maemo/gconfsymbols_p.h:49:25: gconf/gconf.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
Your scratchbox does not have &amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;, so when calling &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;qmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CFLAGS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;LIBS&amp;lt;/code&amp;gt; are not set correctly. Running &amp;lt;code&amp;gt;ln -s /scratchbox/tools/bin/sh /bin/sh&amp;lt;/code&amp;gt; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m trying to compile a diablo Qt package, so I just created a symbolic link, debian, for debian.diablo, and then run dpkg-buildpackage command, but I got a build error because the symbolic link was deleted. ===&lt;br /&gt;
&lt;br /&gt;
 When running dpkg-buildpackage, all symbolic links will be deleted, so need to rename the folder from debian.diablo to debian to make a build of diablo Qt package.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34423</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34423"/>
		<updated>2009-04-15T12:45:22Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Maemo Qt API Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are on a non-debian system such as OpenSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in, in order to get ARM CPU emulation working:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo /scratchbox/sbin/sbox_ctl start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application into the device===&lt;br /&gt;
To run a Qt application into the device, we need to copy it there. To do this we need to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Installing the OpenSSH server in the device====&lt;br /&gt;
* Open the Application Manager&lt;br /&gt;
* Enable the maemo-extras catalogue (Click the application title bar &amp;gt; Tools &amp;gt; Application catalogue...)&lt;br /&gt;
* Install openssh-server from the list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
We can connect to device to our working machine via WLAN or via USB.&lt;br /&gt;
Connecting the device to a WLAN is quite easy; a bit more tricky can be using an usb cable to set up a usb network.&lt;br /&gt;
There is a good how-to in the [http://wiki.maemo.org/USB_networking maemo wiki pages].&lt;br /&gt;
A easy way to setup the usb network in a Diablo device is installing maemo-control-usb.&lt;br /&gt;
After the installation a new item called &amp;quot;USB Networking&amp;quot; will appear in the maemo Control Panel.&lt;br /&gt;
Clicking it will show a dialog with a button. You need to press that button one time to raise a usb interface on your device with 192.168.2.15 as IP.&lt;br /&gt;
After that you have to connect the device to your machine via the USB cable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy Scp] or secure copy is a common linux application. It can copy single/multiple files or a directory and theirs files recursively using a secure connection.&lt;br /&gt;
To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
Now that the application has been copied into the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QString QDesktopServices::storageLocation(StandardLocation type)&#039;&#039;&#039; returns specific Maemo locations for these types:&lt;br /&gt;
  - DesktopLocation:   QDir::homePath() + QLatin1String(&amp;quot;/MyDocs&amp;quot;),            instead of QDir::homePath() + QLatin1String(&amp;quot;/Desktop&amp;quot;)&lt;br /&gt;
  - DocumentsLocation: QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;), instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.documents&amp;quot;)&lt;br /&gt;
  - PicturesLocation:  QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.images&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Pictures&amp;quot;)&lt;br /&gt;
  - MusicLocation:     QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.sounds&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/Music&amp;quot;)&lt;br /&gt;
  - MoviesLocation:    QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;),    instead of QDir::homePath() + QLatin1String(&amp;quot;/MyDocs/.videos&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
  &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN===&lt;br /&gt;
If you are a maemo Qt developer and you want to save your changes in the garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a &lt;br /&gt;
your private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Merging branche changes in the mainline===&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
 Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
* &#039;&#039;&#039;I&#039;m tring to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using X86 include files, then you have to update your Makefile. Running &#039;&#039;qmake&#039;&#039; before run &#039;&#039;make&#039;&#039; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34424</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34424"/>
		<updated>2009-04-15T11:22:18Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Maemo Qt API Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are on a non-debian system such as OpenSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in, in order to get ARM CPU emulation working:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo /scratchbox/sbin/sbox_ctl start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application into the device===&lt;br /&gt;
To run a Qt application into the device, we need to copy it there. To do this we need to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Installing the OpenSSH server in the device====&lt;br /&gt;
* Open the Application Manager&lt;br /&gt;
* Enable the maemo-extras catalogue (Click the application title bar &amp;gt; Tools &amp;gt; Application catalogue...)&lt;br /&gt;
* Install openssh-server from the list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
We can connect to device to our working machine via WLAN or via USB.&lt;br /&gt;
Connecting the device to a WLAN is quite easy; a bit more tricky can be using an usb cable to set up a usb network.&lt;br /&gt;
There is a good how-to in the [http://wiki.maemo.org/USB_networking maemo wiki pages].&lt;br /&gt;
A easy way to setup the usb network in a Diablo device is installing maemo-control-usb.&lt;br /&gt;
After the installation a new item called &amp;quot;USB Networking&amp;quot; will appear in the maemo Control Panel.&lt;br /&gt;
Clicking it will show a dialog with a button. You need to press that button one time to raise a usb interface on your device with 192.168.2.15 as IP.&lt;br /&gt;
After that you have to connect the device to your machine via the USB cable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy Scp] or secure copy is a common linux application. It can copy single/multiple files or a directory and theirs files recursively using a secure connection.&lt;br /&gt;
To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
Now that the application has been copied into the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTabletEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
   - QTabletEvents won&#039;t be used anymore in Fremantle&lt;br /&gt;
    &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN===&lt;br /&gt;
If you are a maemo Qt developer and you want to save your changes in the garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a &lt;br /&gt;
your private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Merging branche changes in the mainline===&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
 Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Image:Help-contents.png]] F.A.Q.==&lt;br /&gt;
* &#039;&#039;&#039;I&#039;m tring to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using X86 include files, then you have to update your Makefile. Running &#039;&#039;qmake&#039;&#039; before run &#039;&#039;make&#039;&#039; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34426</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34426"/>
		<updated>2009-04-09T12:12:15Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* F.A.Q */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are on a non-debian system such as OpenSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in, in order to get ARM CPU emulation working:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo /scratchbox/sbin/sbox_ctl start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application into the device===&lt;br /&gt;
To run a Qt application into the device, we need to copy it there. To do this we need to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Installing the OpenSSH server in the device====&lt;br /&gt;
* Open the Application Manager&lt;br /&gt;
* Enable the maemo-extras catalogue (Click the application title bar &amp;gt; Tools &amp;gt; Application catalogue...)&lt;br /&gt;
* Install openssh-server from the list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
We can connect to device to our working machine via WLAN or via USB.&lt;br /&gt;
Connecting the device to a WLAN is quite easy; a bit more tricky can be using an usb cable to set up a usb network.&lt;br /&gt;
There is a good how-to in the [http://wiki.maemo.org/USB_networking maemo wiki pages].&lt;br /&gt;
A easy way to setup the usb network in a Diablo device is installing maemo-control-usb.&lt;br /&gt;
After the installation a new item called &amp;quot;USB Networking&amp;quot; will appear in the maemo Control Panel.&lt;br /&gt;
Clicking it will show a dialog with a button. You need to press that button one time to raise a usb interface on your device with 192.168.2.15 as IP.&lt;br /&gt;
After that you have to connect the device to your machine via the USB cable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy Scp] or secure copy is a common linux application. It can copy single/multiple files or a directory and theirs files recursively using a secure connection.&lt;br /&gt;
To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
Now that the application has been copied into the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Double click radius&#039;&#039;&#039;&lt;br /&gt;
  The application can set the double click radius by using:&lt;br /&gt;
  static void QApplication::setDoubleClickRadius(int);&lt;br /&gt;
  static int QApplication::doubleClickRadius();&lt;br /&gt;
  The default value is 20px, usually you don&#039;t need to change it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTableEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
    &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN===&lt;br /&gt;
If you are a maemo Qt developer and you want to save your changes in the garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a &lt;br /&gt;
your private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Merging branche changes in the mainline===&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
 Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==F.A.Q==&lt;br /&gt;
* &#039;&#039;&#039;I&#039;m tring to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using X86 include files, then you have to update your Makefile. Running &#039;&#039;qmake&#039;&#039; before run &#039;&#039;make&#039;&#039; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34427</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34427"/>
		<updated>2009-04-09T12:11:43Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Be updated */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are on a non-debian system such as OpenSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in, in order to get ARM CPU emulation working:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo /scratchbox/sbin/sbox_ctl start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application into the device===&lt;br /&gt;
To run a Qt application into the device, we need to copy it there. To do this we need to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Installing the OpenSSH server in the device====&lt;br /&gt;
* Open the Application Manager&lt;br /&gt;
* Enable the maemo-extras catalogue (Click the application title bar &amp;gt; Tools &amp;gt; Application catalogue...)&lt;br /&gt;
* Install openssh-server from the list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
We can connect to device to our working machine via WLAN or via USB.&lt;br /&gt;
Connecting the device to a WLAN is quite easy; a bit more tricky can be using an usb cable to set up a usb network.&lt;br /&gt;
There is a good how-to in the [http://wiki.maemo.org/USB_networking maemo wiki pages].&lt;br /&gt;
A easy way to setup the usb network in a Diablo device is installing maemo-control-usb.&lt;br /&gt;
After the installation a new item called &amp;quot;USB Networking&amp;quot; will appear in the maemo Control Panel.&lt;br /&gt;
Clicking it will show a dialog with a button. You need to press that button one time to raise a usb interface on your device with 192.168.2.15 as IP.&lt;br /&gt;
After that you have to connect the device to your machine via the USB cable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy Scp] or secure copy is a common linux application. It can copy single/multiple files or a directory and theirs files recursively using a secure connection.&lt;br /&gt;
To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
Now that the application has been copied into the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Double click radius&#039;&#039;&#039;&lt;br /&gt;
  The application can set the double click radius by using:&lt;br /&gt;
  static void QApplication::setDoubleClickRadius(int);&lt;br /&gt;
  static int QApplication::doubleClickRadius();&lt;br /&gt;
  The default value is 20px, usually you don&#039;t need to change it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTableEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
    &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN===&lt;br /&gt;
If you are a maemo Qt developer and you want to save your changes in the garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a &lt;br /&gt;
your private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Merging branche changes in the mainline===&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
 Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
&lt;br /&gt;
==F.A.Q==&lt;br /&gt;
* &#039;&#039;&#039;I&#039;m tring to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 /targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&lt;br /&gt;
&lt;br /&gt;
You are using X86 include files, then you have to update your Makefile. Running &#039;&#039;qmake&#039;&#039; before run &#039;&#039;make&#039;&#039; will be solve this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34428</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34428"/>
		<updated>2009-04-06T16:08:44Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Contributing to the Maemo Qt Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are on a non-debian system such as OpenSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in, in order to get ARM CPU emulation working:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo /scratchbox/sbin/sbox_ctl start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application into the device===&lt;br /&gt;
To run a Qt application into the device, we need to copy it there. To do this we need to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Installing the OpenSSH server in the device====&lt;br /&gt;
* Open the Application Manager&lt;br /&gt;
* Enable the maemo-extras catalogue (Click the application title bar &amp;gt; Tools &amp;gt; Application catalogue...)&lt;br /&gt;
* Install openssh-server from the list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
We can connect to device to our working machine via WLAN or via USB.&lt;br /&gt;
Connecting the device to a WLAN is quite easy; a bit more tricky can be using an usb cable to set up a usb network.&lt;br /&gt;
There is a good how-to in the [http://wiki.maemo.org/USB_networking maemo wiki pages].&lt;br /&gt;
A easy way to setup the usb network in a Diablo device is installing maemo-control-usb.&lt;br /&gt;
After the installation a new item called &amp;quot;USB Networking&amp;quot; will appear in the maemo Control Panel.&lt;br /&gt;
Clicking it will show a dialog with a button. You need to press that button one time to raise a usb interface on your device with 192.168.2.15 as IP.&lt;br /&gt;
After that you have to connect the device to your machine via the USB cable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy Scp] or secure copy is a common linux application. It can copy single/multiple files or a directory and theirs files recursively using a secure connection.&lt;br /&gt;
To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
Now that the application has been copied into the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Double click radius&#039;&#039;&#039;&lt;br /&gt;
  The application can set the double click radius by using:&lt;br /&gt;
  static void QApplication::setDoubleClickRadius(int);&lt;br /&gt;
  static int QApplication::doubleClickRadius();&lt;br /&gt;
  The default value is 20px, usually you don&#039;t need to change it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTableEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
    &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
Maemo Qt is a community project. Contributing to the forum, sending us patches, give us feedbacks, tracking bugs are all activities that help us to improve the quality of our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Commit changes in SVN===&lt;br /&gt;
If you are a maemo Qt developer and you want to save your changes in the garage SVN but your project is not ready to go to the main line (trunk/qt-x11), you should create a &lt;br /&gt;
your private branch and then work there until the merging with the mainline.&lt;br /&gt;
&lt;br /&gt;
For that you have to create a your directory in branches/ named &#039;&#039;developer_name-qt&#039;&#039;. After that you can copy trunk/qt-x11 in your directory.&lt;br /&gt;
 svn copy --username developer_name https://garage.maemo.org/svn/qt4/trunk/qt-x11 https://garage.maemo.org/svn/qt4/branches/developer_name-qt -m &amp;quot;Creating private branch of trunk/qt-x11&amp;quot;&lt;br /&gt;
NOTE: Subversion uses cheap copy, so them don&#039;t increase the size of the repository. Then feel free to create your own branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Merging branche changes in the mainline===&lt;br /&gt;
Before to merge your changes in the mainline, the code must be full working, cleaned and tested. A review from another developer is also needed in order to reduce the possibility to add errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Be updated===&lt;br /&gt;
Any Maemo Qt developer should be updated and should participate to the discussions, for that he must join the Mailing list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34429</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34429"/>
		<updated>2009-04-06T13:53:05Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* How to compile a Qt application in scratchbox */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo SDK ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are on a non-debian system such as OpenSUSE you might need to perform the following command&lt;br /&gt;
in another shell prior to logging in, in order to get ARM CPU emulation working:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo /scratchbox/sbin/sbox_ctl start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools you need are available in scratchbox. In order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application in scratchbox===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Running a Qt application into the device===&lt;br /&gt;
To run a Qt application into the device, we need to copy it there. To do this we need to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Installing the OpenSSH server in the device====&lt;br /&gt;
* Open the Application Manager&lt;br /&gt;
* Enable the maemo-extras catalogue (Click the application title bar &amp;gt; Tools &amp;gt; Application catalogue...)&lt;br /&gt;
* Install openssh-server from the list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setting up a network connection====&lt;br /&gt;
We can connect to device to our working machine via WLAN or via USB.&lt;br /&gt;
Connecting the device to a WLAN is quite easy; a bit more tricky can be using an usb cable to set up a usb network.&lt;br /&gt;
There is a good how-to in the [http://wiki.maemo.org/USB_networking maemo wiki pages].&lt;br /&gt;
A easy way to setup the usb network in a Diablo device is installing maemo-control-usb.&lt;br /&gt;
After the installation a new item called &amp;quot;USB Networking&amp;quot; will appear in the maemo Control Panel.&lt;br /&gt;
Clicking it will show a dialog with a button. You need to press that button one time to raise a usb interface on your device with 192.168.2.15 as IP.&lt;br /&gt;
After that you have to connect the device to your machine via the USB cable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using scp to copy the excutable on the device====&lt;br /&gt;
[http://en.wikipedia.org/wiki/Secure_copy Scp] or secure copy is a common linux application. It can copy single/multiple files or a directory and theirs files recursively using a secure connection.&lt;br /&gt;
To copy our application on the device we just need to run it with a syntax like this:&lt;br /&gt;
 PC_$&amp;gt; scp qtApplication root@DEVICE-IP:/home/user&lt;br /&gt;
&lt;br /&gt;
====Executing the application====&lt;br /&gt;
Now that the application has been copied into the device, we can run it. For that we need to open the terminal or we can use ssh from our PC.&lt;br /&gt;
 PC_$&amp;gt; ssh root@DEVICE-IP&lt;br /&gt;
 N810_#&amp;gt; su - user&lt;br /&gt;
 N810_$&amp;gt; ./qtApplication&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Double click radius&#039;&#039;&#039;&lt;br /&gt;
  The application can set the double click radius by using:&lt;br /&gt;
  static void QApplication::setDoubleClickRadius(int);&lt;br /&gt;
  static int QApplication::doubleClickRadius();&lt;br /&gt;
  The default value is 20px, usually you don&#039;t need to change it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTableEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
    &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34432</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34432"/>
		<updated>2009-03-20T14:05:48Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Maemo Qt API Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo Scratchbox ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools that you need are available in scratchbox. So in order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Double click radius&#039;&#039;&#039;&lt;br /&gt;
  The application can set the double click radius by using:&lt;br /&gt;
  static void QApplication::setDoubleClickRadius(int);&lt;br /&gt;
  static int QApplication::doubleClickRadius();&lt;br /&gt;
  The default value is 20px, usually you don&#039;t need to change it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTableEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
    &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
  &lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34433</id>
		<title>Qt4 Hildon Legacy</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_Hildon_Legacy&amp;diff=34433"/>
		<updated>2009-03-20T14:04:58Z</updated>

		<summary type="html">&lt;p&gt;192.100.124.220: /* Image:Helmet.png Maemo Qt API Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:MaemoQtPicture.png]]&lt;br /&gt;
== [[Image:Intro.png]] Intro ==&lt;br /&gt;
&lt;br /&gt;
=== Maemo Platform ===&lt;br /&gt;
The Maemo Platform is the software stack for Nokia Internet Tablets, which includes the Maemo operating system and the Maemo SDK. The Maemo Platform is mostly based on open source code, and has been developed by the Maemo Software department within Nokia in collaboration with many open source projects such as the Linux kernel, Debian, and GNOME.&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform wikipedia])&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/intro/platform/ Read more...]&lt;br /&gt;
&lt;br /&gt;
=== What is Hildon? ===&lt;br /&gt;
Hildon is an application framework for Linux operating system mobile devices (PDAs, mobile phones, etc), developed by Nokia for Maemo and now a part of GNOME, that focuses on providing a finger friendly interface&lt;br /&gt;
[http://en.wikipedia.org/wiki/Hildon Read more]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Developing on Maemo ===&lt;br /&gt;
Developing applications for Maemo is done with the Maemo SDK. The process from creating the first prototype of your application to distributing to a wide audience consists basically of three steps:&lt;br /&gt;
&lt;br /&gt;
* share your application project in the Maemo Garage&lt;br /&gt;
* make your application easy to install and put in the Application Catalog&lt;br /&gt;
* once your application has a high quality - be promoted to the Nokia user site&lt;br /&gt;
[http://maemo.org/intro/developer_overview/ Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Maemo SDK ===&lt;br /&gt;
(from [http://en.wikipedia.org/wiki/Maemo_Platform Wikipedia])&lt;br /&gt;
The Maemo SDK is based around the Debian-oriented Scratchbox Cross Compilation Toolkit, which provides a sandbox environment in which development may take place. Scratchbox uses Qemu to emulate an ARMEL processor or sbrsh to remotely execute instructions. Scratchbox-compatible rootstraps are available for both x86 and ARMEL, so the majority of development and debugging takes place on x86, with final packaging being for ARMEL.&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=c8myh_iBy8k Watch the Maemo SDK in action!]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is Scratchbox? ===&lt;br /&gt;
Scratchbox is a cross compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross compile an entire Linux distribution.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Scratchbox Read more...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Rocket.png]] Getting started ==&lt;br /&gt;
&lt;br /&gt;
To start to develop with Maemo Qt, we need to install the Maemo SDK in our linux box.&lt;br /&gt;
&lt;br /&gt;
=== Hey, I don&#039;t have a linux box! ===&lt;br /&gt;
That&#039;s not a big problem. Maemo SDK Virtual Image project provides a programming environment for Maemo platform.&lt;br /&gt;
You can download from [http://maemovmware.garage.maemo.org/ here] the VMWare image that you can run in [http://www.vmware.com/products/player/ VMPlayer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Maemo Scratchbox ===&lt;br /&gt;
If you want to install the maemo SDK on your linux box this is the page that you want to check:&lt;br /&gt;
[http://maemo.org/development/sdks/ SDK Releases]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing the Qt packages in Scratchbox ===&lt;br /&gt;
After Scratchbox and SDK are installed and working, you need to login, add the &amp;quot;extra&amp;quot; and &amp;quot;extra devel&amp;quot;&lt;br /&gt;
repositories to your apt-get sources and install the Qt libs. Here&#039;s how:&lt;br /&gt;
&lt;br /&gt;
* Paste this into your Scratchbox shell (without the &amp;quot;&amp;gt;&amp;quot; prompt):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; echo &amp;quot;# Maemo extras and extras-devel&lt;br /&gt;
deb http://repository.maemo.org/extras/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras/ diablo free&lt;br /&gt;
deb http://repository.maemo.org/extras-devel/ diablo free non-free&lt;br /&gt;
deb-src http://repository.maemo.org/extras-devel/ diablo free&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run these commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; apt-get update&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-gui&lt;br /&gt;
&amp;gt; fakeroot apt-get install libqt4-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do these steps for the DIABLO_X86 and the DIABLO_ARMEL target if you plan to build on both&lt;br /&gt;
&lt;br /&gt;
===How to compile a Qt application in scratchbox===&lt;br /&gt;
All the Qt tools that you need are available in scratchbox. So in order to compile a Qt application you need to follow the&lt;br /&gt;
standard Qt way:&lt;br /&gt;
 qmake -project&lt;br /&gt;
 qmake file.pro&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Hammer.png]] Porting a Qt application in Maemo ==&lt;br /&gt;
&lt;br /&gt;
===Intro===&lt;br /&gt;
Porting a Qt Desktop application to Maemo requires very few efforts; This because the Maemo Qt libraries will take care of giving the Hildon Maemo look &amp;amp; Feel and enabling the hildon input method for your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overriding the Qt maemo changes===&lt;br /&gt;
====Maemo Style====&lt;br /&gt;
The Maemo style is the default style of the Qt applications that run in Maemo.&lt;br /&gt;
The other styles available in Qt 4.4 maemo are [http://doc.trolltech.com/4.4/gallery-cleanlooks.html QCleanLooks], [http://doc.trolltech.com/4.4/gallery-windows.html Windows] and [http://doc.trolltech.com/4.4/gallery-plastique.html Plastique] (It will be available in the next packages of Qt).&lt;br /&gt;
&lt;br /&gt;
You can force your application to use another style in several way:&lt;br /&gt;
&lt;br /&gt;
1. Running your application with the flag -style &amp;lt;style_name&amp;gt;&lt;br /&gt;
 $&amp;gt; ./qt-test-application -style windows&lt;br /&gt;
&lt;br /&gt;
HINT: You can put this flag in the Exec field of the desktop file that launch the application.&lt;br /&gt;
&lt;br /&gt;
2. If you want to change your code, you can use this static function:[http://doc.trolltech.com/4.4/qapplication.html#setStyle QApplication::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
3. If you want to change the style only for a particular widget, you can call this function in the widget constructor: [http://doc.trolltech.com/4.4/qwidget.html#setStyle QWidget::setStyle( QStyle * style )]&lt;br /&gt;
&lt;br /&gt;
====Showing the status bar====&lt;br /&gt;
The hildon applications don&#039;t have a stuatus bar. Qt for maemo hide the status bar by default.&lt;br /&gt;
You can show it again modifying your code.&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
===Adding Maemo changes to a Qt Application===&lt;br /&gt;
Some methods of Qt for Maemo are not available in the &amp;quot;standard&amp;quot; Qt libs.  &lt;br /&gt;
Then a Qt application with specific Maemo Qt code can&#039;t be built outside the Maemo SDK.&lt;br /&gt;
To avoid this issue, the developer can use the preprocessor directives, for example:&lt;br /&gt;
&lt;br /&gt;
 #ifdef Q_WS_HILDON&lt;br /&gt;
    //Specific hildon code here &lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Bug.png]] Debugging a Qt application ==&lt;br /&gt;
&lt;br /&gt;
===GDB ===&lt;br /&gt;
====Intro ====&lt;br /&gt;
The Gnu Project Debugger, or gdb for short, is a general purpose debugger that can be used for various debugging purposes.&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into scratchbox====&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
====Debugging a Qt application into the device====&lt;br /&gt;
1. Installing gdb into the device&lt;br /&gt;
 A. add the sdk tools repository to the catalogue list&lt;br /&gt;
 B. install gdb by using apt-get (require around 6 Mb of space)&lt;br /&gt;
&lt;br /&gt;
2. Install the debug symbols files in scratchbox (ARMEL target)&lt;br /&gt;
 apt-get install libqt4-dbg&lt;br /&gt;
&lt;br /&gt;
3. Run the application (device side)&lt;br /&gt;
 $gdbserver 0.0.0.0:1234 ./qtApplication&lt;br /&gt;
&lt;br /&gt;
4. Run the gdb client on your host PC (scratchbox side)&lt;br /&gt;
 [sbox-DIABLO_ARMEL: ~/TEST/svn/qt4-x11-4.4.0/examples/widgets/tablet] &amp;gt; gdb ./qtApplication&lt;br /&gt;
&lt;br /&gt;
5. Set the target of gdb&lt;br /&gt;
 (gdb) target remote 172.21.37.117:1234&lt;br /&gt;
&lt;br /&gt;
6. Tell to gdb to continue to debug the application on the device&lt;br /&gt;
 (gdb) continue&lt;br /&gt;
&lt;br /&gt;
7. Wait some moments...&lt;br /&gt;
&lt;br /&gt;
8. Your application will appear on the device screen.&lt;br /&gt;
&lt;br /&gt;
9. Happy debugging!&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
[http://www.gnu.org/software/gdb/documentation/ GDB documentation &amp;amp; Tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/man_pages/gdbserver/ GDBServer man page]&lt;br /&gt;
&lt;br /&gt;
[http://maemo.org/development/documentation/how-tos/3-x/maemo_debugging_guide.html maemo debugging guide]&lt;br /&gt;
&lt;br /&gt;
[http://repository.maemo.org/pool/diablo/free/g/gdb/ gdb debian package for Diablo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:chart.png]] Profiling a Qt application ==&lt;br /&gt;
=== OProfile ===&lt;br /&gt;
Oprofile is a low overhead system-wide profiler for linux. It can be used to find CPU usage bottlenecks in the whole system and within processes. It works fine in the device, but viewing the reports can take quite a long time (10 minutes) when fired up on N800/N810 devices. Therefore, it often makes sense to run opreport in scratchbox.&lt;br /&gt;
&lt;br /&gt;
If you want to know more about OProfile in Maemo click [http://maemo.org/development/tools/doc/chinook/oprofile/ here] to read a good how to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Valgrind ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:package.png]] Packaging a Qt application for Maemo ==&lt;br /&gt;
[http://wiki.maemo.org/Packaging_a_Qt_application Find out more..]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Maemo Qt API Reference ==&lt;br /&gt;
Maemo Qt is based on Qt for X11. It shares the same API avoiding API breaks. In this way every Qt application that runs in other platforms (Windows, MacOS X, Linux, S60) can run also into the Maemo devices.&lt;br /&gt;
&lt;br /&gt;
To Develop a Qt application you can use the [http://doc.trolltech.com/4.4/index.html Official Qt 4.4 API Documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Double click radius&#039;&#039;&#039;&lt;br /&gt;
  The application can set the double click radius by using:&lt;br /&gt;
  static void QApplication::setDoubleClickRadius(int);&lt;br /&gt;
  static int QApplication::doubleClickRadius();&lt;br /&gt;
  The default value is 20px, usually you don&#039;t need to change it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QTableEvents&#039;&#039;&#039; are able to get the pressure value from the touchscreen.&lt;br /&gt;
   - The eventdeviceType is for the touchscreen is set to QTabletEvent::Stylus.&lt;br /&gt;
    &lt;br /&gt;
  &#039;&#039;&#039;Finger poke&#039;&#039;&#039; is emulated in scratchbox by the Middle Mouse button (NOTE: There is no Fullscreen VKB in scratchbox)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;QInputEvents&#039;&#039;&#039; don&#039;t move the cursor. &lt;br /&gt;
  It&#039;s mandatory to get working the HIM moving the cursor via QInputMethodEvents.&lt;br /&gt;
  Why is it mandatory?  &lt;br /&gt;
  Because if the user select text with the finger from the right to the left, we are able to remove the highlighted text, but the&lt;br /&gt;
  cursor will be moved on the last char instead to stay on the first one.&lt;br /&gt;
   &lt;br /&gt;
  To do that some changes has been added to some widget function like: &#039;&#039;widget::inputMethodEvent(QInputMethodEvent *e)&#039;&#039;.&lt;br /&gt;
  Modifing that function in some custom widgets may be necessary.&lt;br /&gt;
  Don&#039;t reimplementing that function will break some fullscreen virtual keyboard features.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Hardcoded Keys:&#039;&#039;&#039;&lt;br /&gt;
  In the QMainWindow:&lt;br /&gt;
  - F6 - Toggle fullscreen the application&lt;br /&gt;
  - F4 - Shows/Hides the application context menu&lt;br /&gt;
  - Zoom in  - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomIn&lt;br /&gt;
  - Zoom out - is a standard [http://doc.trolltech.com/4.4/qkeysequence.html#StandardKey-enum key sequence] QKeySequence::ZoomOut&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Input Method:&#039;&#039;&#039;&lt;br /&gt;
  Maemo Qt uses the Hildon IM as default Input method.&lt;br /&gt;
  Each kind of widget can set the IM mode. This allows the input method to focus on the type of input that the application is expecting.&lt;br /&gt;
  Eg: spinboxes can receive only numeric characters (1-9).&lt;br /&gt;
  &lt;br /&gt;
  NOTE: Qt widgets like QTextEdit, QLineEdit... set the right input method mode automatically. &lt;br /&gt;
  &lt;br /&gt;
  A developer can change it by using:&lt;br /&gt;
    void QInputContext::setInputMode(int mode);&lt;br /&gt;
  It will update immediately the Hildon Input method to use the selected IM mode.  &lt;br /&gt;
  &lt;br /&gt;
  HIC Modes:&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_ALPHA 	alphabetical characters and whitespace&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_NUMERIC 	numbers 0-9 and the &#039;-&#039; character&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_SPECIAL 	special characters&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_HEXA 	hexadecimal characters; numbers 0-9, characters a-f, and A-F&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_TELE 	telephone numbers; numbers 0-9, whitespace, and the characters &amp;quot;pwPW/().-+*#?,&amp;quot;&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_FULL 	unrestricted entry mode, combination of the alpha, numeric and special modes.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_MULTILINE 	the client contains multiple lines of text or accepts linebreaks in the input.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_INVISIBLE 	do not echo or save the input in the IM when entering sensitive information such as passwords.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_AUTOCAP 	automatically capitalize the first letter at the start of a sentence.&lt;br /&gt;
    HILDON_GTK_INPUT_MODE_DICTIONARY 	enable predictive dictionaries and learning based on the input.&lt;br /&gt;
   &lt;br /&gt;
  Example:&lt;br /&gt;
    For a password field we need to set a specific IM mode:&lt;br /&gt;
    int mode = HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE&lt;br /&gt;
    QInputContext qic = widget-&amp;gt;inputContext();&lt;br /&gt;
    qic-&amp;gt;setInputMode(mode);&lt;br /&gt;
  &lt;br /&gt;
  If you are developing a Custom widget able to receive input text, you can instruct your widget to use the right IM Mode just returning&lt;br /&gt;
  the mode.&lt;br /&gt;
  &lt;br /&gt;
  - How does it work?&lt;br /&gt;
  The Hildon IM sends a XMessage to pop up the &amp;quot;Virtual Keyboard&amp;quot; (or better the Main HIM UI) when an input widget receive the focus.&lt;br /&gt;
  The IM before to raise the VKB, makes an inputMethodQuery to the widget retrieving the IM mode.&lt;br /&gt;
  If the developer of the custom widget doesn&#039;t set the mode property, the IM will use HILDON_GTK_INPUT_MODE_FULL (the default mode) for that widget.&lt;br /&gt;
  &lt;br /&gt;
  Setting the ImMode is quite easy. Check the code below for more understanding.&lt;br /&gt;
&lt;br /&gt;
  #ifdef Q_WS_HILDON&lt;br /&gt;
  #include &amp;lt;QInputContext&amp;gt;&lt;br /&gt;
  #endif&lt;br /&gt;
  &lt;br /&gt;
  QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery query) const&lt;br /&gt;
  {    &lt;br /&gt;
    Q_D(const QAbstractSpinBox);&lt;br /&gt;
    switch(query) {&lt;br /&gt;
        case Qt::ImMode:{&lt;br /&gt;
            int mode = HILDON_GTK_INPUT_MODE_NUMERIC;&lt;br /&gt;
            return QVariant(mode);&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            return d-&amp;gt;edit-&amp;gt;inputMethodQuery(query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== [[Image:Helmet.png]] Contributing to the Maemo Qt Project ==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.100.124.220</name></author>
	</entry>
</feed>