blob: 4b62211cdb8b3ce85708dab11eb1f31f2141e028 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright (C) 2022 zccrs <zccrs@live.com>, JiDe Zhang <zhangjide@uniontech.com>.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Controls
ApplicationWindow {
id: window
property alias control: control
property alias item1Palette: item1.palette
property alias item2Palette: item2.palette
palette {
disabled {
windowText: "blue"
}
}
Item {
id: item1
palette.disabled {
text: "yellow"
}
Item {
id: item2
palette.disabled {
window: "yellow"
}
}
}
Control {
id: control
objectName: "Control"
palette {
window: "red"
disabled: item2.palette.disabled
}
}
function resetColor() {
control.palette.window = undefined
}
function resetGroup() {
control.palette.disabled = undefined
}
}
|