Compare commits
2 commits
852fbe7b10
...
2a2fa7e073
Author | SHA1 | Date | |
---|---|---|---|
2a2fa7e073 | |||
5ac74aa5c0 |
4 changed files with 37 additions and 2 deletions
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB |
|
@ -17,9 +17,9 @@ qt_add_qml_module(alisa
|
|||
VERSION 1.0
|
||||
QML_FILES
|
||||
Main.qml
|
||||
Data.qml
|
||||
|
||||
RESOURCES
|
||||
Assets/Images/Boygenius_-_the_record.jpg
|
||||
Assets/Icons/turbo.svg
|
||||
)
|
||||
|
||||
|
|
16
native/Data.qml
Normal file
16
native/Data.qml
Normal file
|
@ -0,0 +1,16 @@
|
|||
import QtQuick
|
||||
|
||||
ListModel {
|
||||
ListElement {
|
||||
name: "Bill Smith"
|
||||
number: "555 3264"
|
||||
}
|
||||
ListElement {
|
||||
name: "John Brown"
|
||||
number: "555 8426"
|
||||
}
|
||||
ListElement {
|
||||
name: "Sam Wise"
|
||||
number: "555 0473"
|
||||
}
|
||||
}
|
|
@ -26,9 +26,28 @@ Window {
|
|||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
height: 50
|
||||
height: 400
|
||||
border.width: 5
|
||||
border.color: getColors().accent
|
||||
color: getColors().midlight
|
||||
|
||||
Component {
|
||||
id: contactDelegate
|
||||
Item {
|
||||
width: 180; height: 40
|
||||
Column {
|
||||
Text { text: '<b>Name:</b> ' + name }
|
||||
Text { text: '<b>Number:</b> ' + number }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
model: Data {}
|
||||
delegate: contactDelegate
|
||||
highlight: Rectangle { color: getColors().highlight; radius: 5 }
|
||||
focus: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue