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.

Revision as of 05:50, 14 June 2013 by hamishwillee (Talk | contribs)

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

Music keyboard example in Qt

From Wiki
Jump to: navigation, search
Article Metadata
Code Example
Source file:
Tested with
Devices(s): Nokia 5800 XpressMusic, Nokia N97 mini
Platform(s): S60 5th Edition
S60 5th Edition
Platform Security
Capabilities: ReadDeviceData
Keywords: Qt Resource System, Animation Framework, GraphicsView, Orientation
Created: axeljaeger (06 Apr 2010)
Last edited: hamishwillee (14 Jun 2013)



The keyboard demo shows a music keyboard that can play tones in either square, saw or triangle sound wave.

In portrait mode, the user can choose a waveform and adjust the volume. A small keyboard for sound-test is provided in the bottom. In landscape mode, the whole screen is filled with a keyboard to be used for actual playing of a song.

The whole user interface is implemented with QGraphicsWidgets in a QGraphicsScene. Animated transitions between portrait and landscape are provided. Switching modes by rotating the device is provided using the QOrientationSensor.

Sound playback is provided when compiled for S60 using native code. As soon as the is a backend for Qt multimedia for Symbian is available, the example will be ported to use the Qt audio system. Playback will then on both mobile and desktop using the same code path.

Because the sensor framework from QtMobility needs ReadDeviceData capability the example cannot be self signed. Use Symbian Signed online for your own testing.

Planned updates

As soon as a solution is found for a version with a Qt-based backend will be released As soon as nokia provides a qt-ish way to lock the screen orientation, this will be added as well


6 April 2010 Initial version that was submitted to the QtMobility-contest. This one was actually not using QtMobility but the so called "Qt Mobile Extensions"
21 September 2010 Use QtMobility instead of Qt Mobile Extensions - Remove own emulator in favor of NokiaQtSDK's new emulator




This page was last modified on 14 June 2013, at 05:50.
83 page views in the last 30 days.