diff options
author | Jani Heikkinen <jani.heikkinen@digia.com> | 2014-04-25 14:12:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-25 14:12:30 +0200 |
commit | 2bee84d1b22867c6b34ba79033c8a7a28e6957ee (patch) | |
tree | a2b8abe60daedb845a475188f22d9071d8e66b7f /tests | |
parent | ea5530ae7ddcc2b104908250d5d9d62c619472ed (diff) | |
parent | 8a41896bb70b9375a7bb9c474a3db90bc40590b0 (diff) | |
download | qtquickcontrols-2bee84d1b22867c6b34ba79033c8a7a28e6957ee.tar.gz |
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_tableview.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml index a9f07a8b..c99d2dcd 100644 --- a/tests/auto/controls/data/tst_tableview.qml +++ b/tests/auto/controls/data/tst_tableview.qml @@ -385,6 +385,24 @@ TestCase { verify(table.selection.contains(8)) } + function test_initializedStyleData() { + var table = Qt.createQmlObject('import QtQuick.Controls 1.2; \ + import QtQuick 2.2; \ + TableView { \ + model: 3; \ + TableViewColumn{} \ + property var items: []; \ + property var rows: []; \ + itemDelegate: Item{ Component.onCompleted: { items.push(styleData.row) } } \ + rowDelegate: Item{ Component.onCompleted: { if (styleData.row !== undefined) rows.push(styleData.row) } } \ + }' + , testCase, '') + waitForRendering(table) + compare(table.items, [0, 1, 2]); + compare(table.rows, [0, 1, 2]); + } + + function test_usingcppqobjectmodel() { var component = Qt.createComponent("tableview/table1_qobjectmodel.qml") |