Showing Qt for Maemo applications built with the Nokia Qt SDK in the application menu
The article is believed to be still valid for the original topic scope.
Contents |
Overview
This article shows how to enable an application icon for a Qt for Maemo application built with the Qt Creator v2.0.1 in the Nokia Qt SDK v1.0.1.
The current Qt Creator version does not generate an application icon or application desktop file for a Qt for Maemo application by default, you have to define them manually. The complete build support is expected for the upcoming Qt Creator v2.1 that will be used in the Nokia Qt SDK in the near future.
In this solution, you need to create and add graphics for the application icon and the desktop file (required by the Maemo application menu in order to show application icons and to be able to start the applications). Note that the name for the both files should be the same as your application binary (which is defined in the pro file as {{{1}}}).
Preconditions
- Install the latest Nokia Qt SDK
1. First build
Note: First, build your project once for Maemo with the Nokia Qt SDK in order to get a Debian folder with a number of packaging files. Once this is done, we copy the icon and desktop file to that folder manually.
2. Define the desktop file
Create the <myappname>.desktop file with the following contents:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=<MyAppName>
Exec=/usr/local/bin/<myappname>
Icon=<appname>
StartupWMClass=
X-Window-Icon=<myappname>
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
Terminal=false
Copy the file into:
<myprojectname>\debian\<myappname>\usr\share\applications\hildon\
3. Define the application icon
Create the <myappname>.png file for the icon.
Copy the file into: <myprojectname>\debian\<myappname>\usr\share\icons\hicolor\64x64\apps\
4. Define a maemo5 section in the project file
# Application binary name
TARGET = <myappname>
maemo5 {
isEmpty(PREFIX):PREFIX = /usr/local
BINDIR = $$PREFIX/bin
DATADIR = $$PREFIX/share
DEFINES += DATADIR=\\\"$$DATADIR\\\" \
PKGDATADIR=\\\"$$PKGDATADIR\\\"
target.path = $$BINDIR
INSTALLS += target
}
5. Build again
A new Debian package that includes the added files is created.
Postconditions
Your Qt for Maemo application now has a Debian package with an application icon and a desktop file.
Note: The device may need to be restarted in order to show the icon in the application menu.


Please make a note that these steps are already implemented in QtSDK 1.1 TP, and do NOT need to be done manually.