Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Qt Key Event test example

From 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
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. - Link to the the complete source code for the example

This page was last modified on 23 July 2012, at 12:22.
52 page views in the last 30 days.