mirror of
https://github.com/status-im/nimqml.git
synced 2025-02-22 19:38:22 +00:00
Little fix and code cleanup
This commit is contained in:
parent
c889678be7
commit
af0842b8ce
@ -7,13 +7,14 @@ ApplicationWindow {
|
||||
width: 400
|
||||
height: 300
|
||||
title: "AbstractItemModel"
|
||||
|
||||
Component.onCompleted: visible = true
|
||||
|
||||
Component {
|
||||
id: myListModelDelegate
|
||||
Label { text: "Name:" + name }
|
||||
}
|
||||
|
||||
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
model: myListModel
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
@ -53,11 +53,11 @@ ApplicationWindow {
|
||||
id: tableItemDelegateInstance
|
||||
sourceComponent: {
|
||||
if (styleData.column === 0 || styleData.column === 1)
|
||||
return tableTextDelegate
|
||||
return tableTextDelegate
|
||||
else if (styleData.column === 2)
|
||||
return tableButtonDelegate
|
||||
return tableButtonDelegate
|
||||
else
|
||||
return tableTextDelegate
|
||||
return tableTextDelegate
|
||||
}
|
||||
Binding {
|
||||
target: tableItemDelegateInstance.item
|
||||
|
@ -7,6 +7,7 @@ ApplicationWindow {
|
||||
width: 400
|
||||
height: 300
|
||||
title: "SimpleData"
|
||||
|
||||
Component.onCompleted: visible = true
|
||||
|
||||
ColumnLayout {
|
||||
|
Loading…
x
Reference in New Issue
Block a user