summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tableview.qml
diff options
context:
space:
mode:
authorJoni Poikelin <joni.poikelin@theqtcompany.com>2015-06-04 10:09:36 +0300
committerJoni Poikelin <joni.poikelin@theqtcompany.com>2015-06-04 10:21:18 +0000
commit1c49a841d9daa7bc498e35b8cc0331e04e96ec70 (patch)
tree1ce24d4a956300a28e47aba137a531da40c7e8d5 /tests/auto/controls/data/tst_tableview.qml
parente648611e6d64891f1723a0e32c783c8d5f994de1 (diff)
downloadqtquickcontrols-1c49a841d9daa7bc498e35b8cc0331e04e96ec70.tar.gz
Fix TableView extra row with headerVisible:false
Task-number: QTBUG-46468 Change-Id: I6718bc860f26a287ff4580e4844aec225c0f70b7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r--tests/auto/controls/data/tst_tableview.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index 468c7eeb..9bb2cd67 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -69,6 +69,32 @@ TestCase {
]
}
+ function test_QTBUG_46468() {
+ var table = Qt.createQmlObject('import QtQuick.Controls 1.3; \n\
+ import QtQuick 2.4; \n\
+ TableView { \n\
+ headerVisible: false; \n\
+ TableViewColumn{} \n\
+ model: 10; \n\
+ }', testCase, '')
+ wait(50);
+ verify(table.__viewTopMargin === 0)
+ table.destroy()
+ }
+
+ function test_headervisible() {
+ var table = Qt.createQmlObject('import QtQuick.Controls 1.3; \n\
+ import QtQuick 2.4; \n\
+ TableView { \n\
+ headerVisible: true; \n\
+ TableViewColumn{} \n\
+ model: 10; \n\
+ }', testCase, '')
+ wait(50);
+ verify(table.__viewTopMargin > 0)
+ table.destroy()
+ }
+
function test_basic_setup() {
var test_instanceStr =
'import QtQuick 2.2; \