Archived:Qt Key Event test example
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.
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
Source file: Media:QtforMaemoKeyEventTest.zip
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


Is this application really "maemo" specific as tagged, or is it just that its only been tested on Maemo? If its generic code, please remove the maemo category.
hamishwillee 06:30, 28 April 2011 (UTC)