| 1 |
import QtQuick 2.0 |
| 2 |
|
| 3 |
Item { |
| 4 |
width: 320 |
| 5 |
height: 480 |
| 6 |
|
| 7 |
Component { |
| 8 |
id: component |
| 9 |
Column { |
| 10 |
property variant listModel: model |
| 11 |
Repeater { |
| 12 |
model: [Text.NativeRendering, Text.QtRendering] |
| 13 |
Rectangle { |
| 14 |
width: text.implicitWidth |
| 15 |
height: text.implicitHeight |
| 16 |
color: listModel.backGroundColor ? listModel.backGroundColor : "white" |
| 17 |
|
| 18 |
Text { |
| 19 |
id: text |
| 20 |
font.pixelSize: 32 |
| 21 |
renderType: modelData |
| 22 |
text: "๐จโ๐ฉโ๐งโ๐ฆ" |
| 23 |
|
| 24 |
color: listModel.color ? listModel.color : "black" |
| 25 |
opacity: listModel.opacity ? listModel.opacity : 1.0 |
| 26 |
} |
| 27 |
} |
| 28 |
} |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
Column { |
| 33 |
anchors.centerIn: parent |
| 34 |
Repeater { |
| 35 |
model: ListModel { |
| 36 |
ListElement { color: "black" } |
| 37 |
ListElement { color: "blue" } |
| 38 |
ListElement { color: "#990000ff" } |
| 39 |
ListElement { opacity: 0.5 } |
| 40 |
ListElement { backGroundColor: "green" } |
| 41 |
} |
| 42 |
delegate: component |
| 43 |
} |
| 44 |
} |
| 45 |
} |