-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProductTable.qml
62 lines (52 loc) · 1.5 KB
/
ProductTable.qml
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
53
54
55
56
57
58
59
60
61
62
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.0
Item {
property var origgpcd
property var origgpfr
property var origfdcd
//property var origfdnm
property alias component1: component1
property alias component2: component2
property string pageTitle: component2.visible ? "Comparaison" : "Produit"
id: productView
objectName: component2.visible ? "compareView" : "productView"
RowLayout {
anchors.fill: parent
spacing: 0
Item {
id: component1
Layout.fillWidth: true
Layout.fillHeight: true
}
Rectangle {
Layout.fillHeight: true
width: 1
color: "#CECECE"
visible: component2.visible
}
Item {
id: component2
Layout.fillWidth: true
Layout.fillHeight: true
visible: false
}
}
RoundButton {
id: linkScrolls
text: checked ? "-" : "x"
anchors.horizontalCenter: parent.horizontalCenter
visible: component2.visible
checkable: true
onToggled: {
if (checked) {
component1.children[0].syncList = component2.visible ? component2.children[0] : null;
component2.children[0].syncList = component1.children[0];
}
else {
component1.children[0].syncList = null;
component2.children[0].syncList = null;
}
}
}
}