Toggle navigation

Step 2: Handling mouse and key events

MouseArea is an element that reacts to the mouse events happening inside it. Clicking inside the MouseArea causes the onClicked signal handler to be called.

Move the automatically created MouseArea into quitButton. After this, clicking inside quitButton causes Qt.quit() to be called.

Key events can be handled using the handlers of the Key component. If you want the focus between UI items to be changed using keys, it can be done with properties of the KeyNavigation component. Other key signal handles can be set via properties of the Keys component.

At this point, volumeAdjuster and modeButton will give you an error, but they will be added later.

If the application is not working properly, download and use the files in this zip file.


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