In this section, we will learn how to develop a touch-driven application that runs on mobile devices using Qt Quick.
Touch events
How to do it...
Let's get started by following this step-by-step guide:
- Create a new Qt Quick application – Empty project.
- In Qt Creator, right-click on qml.qrc and select Open in Editor. Then, click Add | Add Files and add tux.png to the project as follows:
- Next, open up MainForm.ui.qml. Drag an image widget from the Library window to the canvas. Then, set the source of the image to tux.png and set its fillMode to PreserveAspectFit. After that, set its width to 200 and its height to 220.
- Make sure that both the mouse area widget and the image widget are exported as alias properties...