<?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.89.123.41</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.89.123.41"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/192.89.123.41"/>
	<updated>2026-04-22T01:56:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Qt4_development&amp;diff=34526</id>
		<title>Qt4 development</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Qt4_development&amp;diff=34526"/>
		<updated>2010-04-30T09:16:08Z</updated>

		<summary type="html">&lt;p&gt;192.89.123.41: /* Image:Rocket.png Getting started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;IMPORTANT: This page is for Fremantle PR 1.2 using Qt 4.6.&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;If you want to develop for Diablo or use Qt 4.5 please have a look at the [[Qt4_Hildon_Legacy|Qt4 Hildon Legacy Page]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= [[Image:Intro.png]] Introduction =&lt;br /&gt;
&lt;br /&gt;
To develop with [[Qt-Maemo|Qt for Maemo]], a working SDK installation is required. There are [[Documentation/Maemo_5_Final_SDK_Installation|instructions on how to install the Maemo SDK]], and you can [http://www.youtube.com/watch?v=c8myh_iBy8k watch the Maemo SDK in action]. Alternatively, you may want to try [[MADDE]], a cross-platform Maemo development tool, available as a technology preview.&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 [[Documentation/Maemo_5_Final_SDK_Installation|install the Maemo SDK]].&lt;br /&gt;
&lt;br /&gt;
Since PR 1.2 release Qt 4.6 is available in public Fremantle repository&lt;br /&gt;
To upgrade older scratchbox targets to use the latest packages execute the following commands (inside the scratchbox):&lt;br /&gt;
 fakeroot apt-get update&lt;br /&gt;
 fakeroot apt-get dist-upgrade&lt;br /&gt;
&lt;br /&gt;
You can install Qt with the command:&lt;br /&gt;
 fakeroot apt-get install libqt4-dev&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/qt-maemo-4.6/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;
# Generating project file (Required if there is no .pro file into the app source tree)&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;qmake -project&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Generating Makefile from the QMake project file:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;qmake file.pro&amp;lt;/pre&amp;gt;&lt;br /&gt;
# &amp;lt;pre&amp;gt;make&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CMake ===&lt;br /&gt;
&lt;br /&gt;
CMake projects usually have a &amp;lt;code&amp;gt;CMakeLists.txt&amp;lt;/code&amp;gt; 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. In the directory containing CMakeLists.txt, supply the following two commands, where path is the path to the source code.&lt;br /&gt;
 cmake path&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Note: CMake is not installed by default in [[:Category:Scratchbox|scratchbox]]. You can install it with the command:&lt;br /&gt;
 fakeroot apt-get install cmake&lt;br /&gt;
&lt;br /&gt;
== Running a Qt application in: ==&lt;br /&gt;
=== 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;
# Run Xephyr. It is able to run a [http://en.wikipedia.org/wiki/X_Window_System  X Server] inside another X Server.&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Set display for application that runs inside scratchbox:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;export DISPLAY=:2&amp;lt;/pre&amp;gt;&lt;br /&gt;
# You can now run the SDK UI. A Diablo or Fremantle desktop will appear in your Xephyr window:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;af-sb-init.sh start&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now you are ready to run any Maemo or Maemo Qt application with:&amp;lt;pre&amp;gt;run-standalone.sh ./qtapps&amp;lt;/pre&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;
=== Device ===&lt;br /&gt;
Maemo Qt applications are Linux binaries. They can run on the device without any problem if you copy them to &amp;quot;partitions&amp;quot; mounted with exec flag. (for example, /home/user or /opt in Fremantle).&lt;br /&gt;
&lt;br /&gt;
Fore example, if we want to run quassel (Qt IRC Client) we have to launch it with:&lt;br /&gt;
 su -c ./quassel user&lt;br /&gt;
&lt;br /&gt;
= [[Image:Hammer.png]] Porting Qt applications to Maemo =&lt;br /&gt;
&lt;br /&gt;
Porting a Qt desktop application to Maemo requires very little effort. This is 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;
 ./qt-test-application -style windows&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:&lt;br /&gt;
&lt;br /&gt;
In the source code:&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;
In the project file:&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;
== Home widget interaction ==&lt;br /&gt;
{{main|Qt4 and Hildon home widget interaction}}&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;
= [[Image:Bug.png]] Debugging a Qt application =&lt;br /&gt;
&lt;br /&gt;
{{main|Documentation/Maemo_5_Developer_Guide/Kernel_and_Debugging_Guide/Maemo_Debugging_Guide}}&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 on the device. Using gdb 7.0 is recommended. You can get gdb 7.0 sources from http://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;
= [[Image:chart.png]] Profiling a Qt application =&lt;br /&gt;
&lt;br /&gt;
== OProfile ==&lt;br /&gt;
&lt;br /&gt;
{{main|Documentation/devtools/maemo5/oprofile}}&lt;br /&gt;
&lt;br /&gt;
== Valgrind ==&lt;br /&gt;
&lt;br /&gt;
{{main|Documentation/devtools/maemo5/valgrind}}&lt;br /&gt;
&lt;br /&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;
= [[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://qt.nokia.com/doc/qt-maemo-4.6 Official Qt 4.6 for Maemo API documentation] and the list below to see what are the Maemo changes.&lt;br /&gt;
&lt;br /&gt;
Here are examples that show 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/4.6-fremantle/examples/maemo5/widgets&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Maemo5 Readme file==&lt;br /&gt;
There is a [http://qt.gitorious.org/+qt-developers/qt/x11-maemo/blobs/4.6-fremantle/README.maemo5 README file in Qt 4.6 source tree].&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;
==Stay 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;
&lt;br /&gt;
{{main|Qt Maemo Git Process}}&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&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 repository==&lt;br /&gt;
&lt;br /&gt;
# Clone the repository:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;git clone git://gitorious.org/+qt-developers/qt/x11-maemo.git qt-maemo&amp;lt;/pre&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
# Change dir:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;cd qt-maemo&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Configure Qt:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;./configure -maemo5&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Build Qt:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;make&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Install Qt:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;make install&amp;lt;/pre&amp;gt;&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;
==QML==&lt;br /&gt;
[[QML]] is a GUI interface building scripting language for Qt. Check out the [[QML-EnhancedCalcExample | QML calculator example]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=[[Image:Help-contents.png]] F.A.Q.=&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;I&#039;m trying to compile a Qt application for ARMEL, but I got the error below. What&#039;s wrong?&#039;&#039;&lt;br /&gt;
: &amp;lt;pre&amp;gt;/targets/FREMANTLE_X86/usr/include/qt4/QtCore/qatomic_i386.h:127: error: impossible constraint in &#039;asm&#039;&amp;lt;/pre&amp;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;
: &amp;lt;pre&amp;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&amp;lt;/pre&amp;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 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;
: 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;
: &amp;lt;pre&amp;gt;http://qt4.garage.maemo.org/patches/qt4-missing-header.tgz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>192.89.123.41</name></author>
	</entry>
</feed>