×
Namespaces

Variants
Actions
Revision as of 00:06, 6 February 2013 by lpvalente (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Showing Qt for Maemo applications built with the Nokia Qt SDK in the application menu

From Nokia Developer Wiki
Jump to: navigation, search

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

The article is believed to be still valid for the original topic scope.


Article Metadata
Tested with
Devices(s): Nokia N900
Compatibility
Platform(s): Maemo
Symbian
Article
Keywords: Icon
Created: tepaa (08 Oct 2010)
Last edited: lpvalente (06 Feb 2013)

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

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.

This page was last modified on 6 February 2013, at 00:06.
82 page views in the last 30 days.
×