blob: d41537a63704c0cf2848ab167d0a7634085318be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import QtQuick 2.2
import QtTest 1.1
Item {
id: root;
width: 200
height: 200
TestCase {
id: testCase
name: "animators-opacity"
when: box.opacity == 0.5
function test_endresult() {
compare(box.opacityChangeCounter, 1);
var image = grabImage(root);
compare(image.red(50, 50), 255);
verify(image.green(50, 50) > 0);
verify(image.blue(50, 50) > 0);
}
}
Box {
id: box
OpacityAnimator {
id: animation
target: box
from: 1;
to: 0.5
duration: 100
running: true
}
}
}
|