×
Namespaces

Variants
Actions

Archived:Qt Key Event test example

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}}.

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 ExampleCompatibility
Platform(s):
Symbian
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.
102 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×