QCounter Examples
Example below shows three animation modes of QCounter control.
All three controls share the same ImageList resource.
// Create imagelist
DIGITS = new QImageList(8, 10, "img/qlib/d0.gif", "img/qlib/d1.gif",
"img/qlib/d2.gif", "img/qlib/d3.gif", "img/qlib/d4.gif",
"img/qlib/d5.gif", "img/qlib/d6.gif", "img/qlib/d7.gif",
"img/qlib/d8.gif", "img/qlib/d9.gif", "img/qlib/z.gif");
// Create counters
cnt1 = new QCounter(null, "cnt1", DIGITS); // use default size/effect
cnt2 = new QCounter(null, "cnt2", DIGITS, 6, QCounter.INSTANT);
cnt3 = new QCounter(null, "cnt3", DIGITS, 4, QCounter.SLOW);