diff options
Diffstat (limited to 'tests/auto/quick/qquickvisualdatamodel/data/packageView.qml')
-rw-r--r-- | tests/auto/quick/qquickvisualdatamodel/data/packageView.qml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickvisualdatamodel/data/packageView.qml b/tests/auto/quick/qquickvisualdatamodel/data/packageView.qml new file mode 100644 index 0000000000..682f3833d1 --- /dev/null +++ b/tests/auto/quick/qquickvisualdatamodel/data/packageView.qml @@ -0,0 +1,63 @@ +import QtQuick 2.0 + +Item { + width: 240 + height: 320 + + Component { + id: myDelegate + + Package { + Rectangle { + id: leftWrapper + objectName: "wrapper" + Package.name: "left" + height: 20 + width: 120 + Text { + text: index + } + color: ListView.isCurrentItem ? "lightsteelblue" : "white" + } + Rectangle { + id: rightWrapper + objectName: "wrapper" + Package.name: "right" + height: 20 + width: 120 + Text { + text: index + } + color: ListView.isCurrentItem ? "lightsteelblue" : "white" + } + } + + } + + VisualDataModel { + id: visualModel + + delegate: myDelegate + model: testModel + } + + ListView { + id: leftList + objectName: "leftList" + anchors { + left: parent.left; top: parent.top; + right: parent.horizontalCenter; bottom: parent.bottom + } + model: visualModel.parts.left + } + + ListView { + id: rightList + objectName: "rightList" + anchors { + left: parent.horizontalCenter; top: parent.top; + right: parent.right; bottom: parent.bottom + } + model: visualModel.parts.right + } +} |