Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / qdeclarativetext / bugs / QTBUG-14469.qml
1 import QtQuick 1.0
2 import "../../shared" 1.0
3
4 /* The bug was that if text was set to "" or the size didn't increase, the text didn't repaint
5    ended up only repainting for 1, 10, 11, 12.
6    Test passes if it goes from "" to 13 back to "" with all numbers being painted (and the text disappearing at 0)
7  */
8
9 Item{
10     width: 80
11     height: 80
12     property int val: 0
13     Text{
14         id: txt;
15         text: val == 0 ? "" : val
16     }
17     Timer{
18         interval: 100
19         running: true
20         repeat: true;
21         onTriggered: {val = (val + 1) % 14;}
22     }
23 }