QML Scrolling Digits
Jump to navigation
Jump to search
English Български
How to create scrolling digits component
Here is one way to easily create a scrolling digits component.
Code
First we create a component for digits:
Digit.qml
The component is just a Rectangle with gradient. In its center we place a PathView and set clipping to true, so only the selected digit will be visible.
Than we create the ScrollingDigits component:
ScrollingDigits.qml
We add two properties to Row: number and positions . number contains the number we want to display and positions is the number of digits we want.