Namespaces
Variants
Actions

Archived:Qt Key Event test example

Jump to: navigation, search
Archived.png
Archived: 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}}.

Qt Quick should be used for all UI development on mobile devices. The approach described in this article (using C++ for the Qt app UI) is deprecated.
Article Metadata

Code Example
Article
Created: seppo_fn (11 Oct 2009)
Last edited: hamishwillee (23 Jul 2012)

This code example demonstrates how to control key events from a Qt application on Maemo.

When a widget has the keyboard input focus, key events are sent to it when keys are pressed or released. Sometimes the developer wants to use events from keyboard to perform custom action, such as control in games. It can be done by reimplementing the virtual protected method QWidget::keyPressEvent in a class which inherits from QWidget.

File:QtforMaemoKeyEventTest.zip - Link to the the complete source code for the example

This page was last modified on 23 July 2012, at 15:22.
196 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved