summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml
blob: aca7c2dd6604fcb9a0c1965716f3842f54c17527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import QtQuick 1.0
import "../../shared" 1.0

/* The bug was that if text was set to "" or the size didn't increase, the text didn't repaint
   ended up only repainting for 1, 10, 11, 12.
   Test passes if it goes from "" to 13 back to "" with all numbers being painted (and the text disappearing at 0)
 */

Item{
    width: 80
    height: 80
    property int val: 0
    Text{
        id: txt;
        text: val == 0 ? "" : val
    }
    Timer{
        interval: 100
        running: true
        repeat: true;
        onTriggered: {val = (val + 1) % 14;}
    }
}