diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-04-26 10:39:04 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-26 11:22:40 +0200 |
commit | d4e7332f1769bfdbdda934ca547080e9fe3a799c (patch) | |
tree | 19712a65a7aca1a247dfd114d6e4c25c7f54b39a /tests/auto/controls/data/tst_tableview.qml | |
parent | 4435aaefa466512208683395b5c30f0e6ee4783e (diff) | |
download | qtquickcontrols-d4e7332f1769bfdbdda934ca547080e9fe3a799c.tar.gz |
Don't select a TableView index by default
Change-Id: I436849ce43b11dd3b61ef59280e3b8fa39b7da0f
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r-- | tests/auto/controls/data/tst_tableview.qml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml index 4bdf15db..b03d58fe 100644 --- a/tests/auto/controls/data/tst_tableview.qml +++ b/tests/auto/controls/data/tst_tableview.qml @@ -64,6 +64,29 @@ TestCase { ] } + function test_basic_setup() { + var test_instanceStr = + 'import QtQuick 2.1; \ + import QtQuick.Controls 1.0; \ + TableView { \ + TableViewColumn { \ + } \ + model: 10 \ + }' + + var table = Qt.createQmlObject(test_instanceStr, testCase, '') + compare(table.currentRow, -1) + verify(table.rowCount === 10) + verify (table.currentRowItem === null) + table.currentRow = 0 + verify(table.currentRowItem !== null) + verify (table.currentRow === 0) + table.currentRow = 3 + verify(table.currentRowItem !== null) + verify (table.currentRow === 3) + table.destroy() + } + function test_usingqmlmodel(data) { var component = Qt.createComponent(data.a) |