I'am trying to replicate the look of mechanical counter with QtQuick. (Image below is from http://en.wikipedia.org/wiki/Counter#Mechanical_counters) The counter value is a floating point number and 8.5 might show a counter wheel showing the bottom of the 8 and the top of the 9.
For the individual wheels I thought of displaying shifting excerpts of graphic strips. The following graphics shall illustrate this. My QML component should display the digits in the blue rectangle, the rest (blurred in the image below) shall not be visible.
My question is what would be the best approach to construct the view and update the counter display?
- Have a small
Canvas
element for each digit, then draw an excerpt of the graphic strip into it? - Use a small
Flickable
with the whole graphic strip as a child and then pan the graphic strip? But I don't want the counter view to be mutable by the user, i.e. it should not accept mouse or touch events to pan the view. - Any other approaches?