-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCarrinhoView.qml
46 lines (42 loc) · 1.08 KB
/
CarrinhoView.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
import QtQuick 2.9
import QtQuick.Window 2.12
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.3
import QtQuick.Layouts 1.3
import Models 1.0
ListView {
clip: true
spacing: 8
signal removePressed(int index)
delegate: Card {
height: 50
width: parent.width
RowLayout {
anchors {
fill: parent
leftMargin: 16
rightMargin: 16
}
Text {
Layout.fillWidth: true
text: model.name
}
Text {
Layout.fillWidth: true
text: model.price
horizontalAlignment: Text.AlignRight
}
Button {
Material.foreground: "white"
background: Rectangle {
color: "#146d99"
radius: 16
}
text: "Remover"
onPressed: {
removePressed(index)
}
}
}
}
}