aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktableview/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicktableview/data')
-rw-r--r--tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/asyncloader.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/asyncplain.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/changemodelfromdelegate.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/changemodelordelegateduringupdate.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/checkalwaysemit.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/checkmodelpropertyrevision.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/checkrowandcolumnnotchanged.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/columnwidthboundtoviewwidth.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/contentwidthheight.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/countingtableview.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/delegateWithRequired.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/delegatewithRequiredUnset.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/delegatewithanchors.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/editdelegate.qml6
-rw-r--r--tests/auto/quick/qquicktableview/data/editdelegate_combobox.qml6
-rw-r--r--tests/auto/quick/qquicktableview/data/forcelayout.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/hiderowsandcolumns.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/iscolumnloaded.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/plaintableview.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/positionlast.qml52
-rw-r--r--tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/reordertableview.qml52
-rw-r--r--tests/auto/quick/qquicktableview/data/resetJsModelData.qml19
-rw-r--r--tests/auto/quick/qquicktableview/data/resetModelData.qml25
-rw-r--r--tests/auto/quick/qquicktableview/data/setcontentpos.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/sizefromdelegate.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/syncviewsimple.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/tableviewfocus.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/tableviewinteractive.qml32
-rw-r--r--tests/auto/quick/qquicktableview/data/tableviewwithselected1.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/tableviewwithselected2.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/unloadheader.qml43
-rw-r--r--tests/auto/quick/qquicktableview/data/usechooserwithoutdefault.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml2
-rw-r--r--tests/auto/quick/qquicktableview/data/zerosizedtableview.qml10
-rw-r--r--tests/auto/quick/qquicktableview/data/zerosizedviewport.qml31
41 files changed, 300 insertions, 38 deletions
diff --git a/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml b/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml
index c23394b3d5..106a95de7f 100644
--- a/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml
+++ b/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/asyncloader.qml b/tests/auto/quick/qquicktableview/data/asyncloader.qml
index 8e87b60b0f..ac901323f1 100644
--- a/tests/auto/quick/qquicktableview/data/asyncloader.qml
+++ b/tests/auto/quick/qquicktableview/data/asyncloader.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
diff --git a/tests/auto/quick/qquicktableview/data/asyncplain.qml b/tests/auto/quick/qquicktableview/data/asyncplain.qml
index eba13e72a4..25eb14b016 100644
--- a/tests/auto/quick/qquicktableview/data/asyncplain.qml
+++ b/tests/auto/quick/qquicktableview/data/asyncplain.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/changemodelfromdelegate.qml b/tests/auto/quick/qquicktableview/data/changemodelfromdelegate.qml
index e20b099ae9..60b02bc245 100644
--- a/tests/auto/quick/qquicktableview/data/changemodelfromdelegate.qml
+++ b/tests/auto/quick/qquicktableview/data/changemodelfromdelegate.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/changemodelordelegateduringupdate.qml b/tests/auto/quick/qquicktableview/data/changemodelordelegateduringupdate.qml
index bcb310814c..f0c7814186 100644
--- a/tests/auto/quick/qquicktableview/data/changemodelordelegateduringupdate.qml
+++ b/tests/auto/quick/qquicktableview/data/changemodelordelegateduringupdate.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/checkalwaysemit.qml b/tests/auto/quick/qquicktableview/data/checkalwaysemit.qml
index 600e120a12..463e21342c 100644
--- a/tests/auto/quick/qquicktableview/data/checkalwaysemit.qml
+++ b/tests/auto/quick/qquicktableview/data/checkalwaysemit.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/checkmodelpropertyrevision.qml b/tests/auto/quick/qquicktableview/data/checkmodelpropertyrevision.qml
index 560429308c..f89fff8de1 100644
--- a/tests/auto/quick/qquicktableview/data/checkmodelpropertyrevision.qml
+++ b/tests/auto/quick/qquicktableview/data/checkmodelpropertyrevision.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.12
diff --git a/tests/auto/quick/qquicktableview/data/checkrowandcolumnnotchanged.qml b/tests/auto/quick/qquicktableview/data/checkrowandcolumnnotchanged.qml
index bf62a0e393..fa15f2f54b 100644
--- a/tests/auto/quick/qquicktableview/data/checkrowandcolumnnotchanged.qml
+++ b/tests/auto/quick/qquicktableview/data/checkrowandcolumnnotchanged.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/columnwidthboundtoviewwidth.qml b/tests/auto/quick/qquicktableview/data/columnwidthboundtoviewwidth.qml
index bbbdf74d4e..eaf0cd692d 100644
--- a/tests/auto/quick/qquicktableview/data/columnwidthboundtoviewwidth.qml
+++ b/tests/auto/quick/qquicktableview/data/columnwidthboundtoviewwidth.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/contentwidthheight.qml b/tests/auto/quick/qquicktableview/data/contentwidthheight.qml
index 12cf58d5c4..f6ae474bf4 100644
--- a/tests/auto/quick/qquicktableview/data/contentwidthheight.qml
+++ b/tests/auto/quick/qquicktableview/data/contentwidthheight.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/countingtableview.qml b/tests/auto/quick/qquicktableview/data/countingtableview.qml
index 31cd7ec849..a73cb6e4cf 100644
--- a/tests/auto/quick/qquicktableview/data/countingtableview.qml
+++ b/tests/auto/quick/qquicktableview/data/countingtableview.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/delegateWithRequired.qml b/tests/auto/quick/qquicktableview/data/delegateWithRequired.qml
index 27dff1aadd..728de37266 100644
--- a/tests/auto/quick/qquicktableview/data/delegateWithRequired.qml
+++ b/tests/auto/quick/qquicktableview/data/delegateWithRequired.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/delegatewithRequiredUnset.qml b/tests/auto/quick/qquicktableview/data/delegatewithRequiredUnset.qml
index 13afd88522..43a1eed402 100644
--- a/tests/auto/quick/qquicktableview/data/delegatewithRequiredUnset.qml
+++ b/tests/auto/quick/qquicktableview/data/delegatewithRequiredUnset.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/delegatewithanchors.qml b/tests/auto/quick/qquicktableview/data/delegatewithanchors.qml
index 6354d8d1ed..8b192e0b9e 100644
--- a/tests/auto/quick/qquicktableview/data/delegatewithanchors.qml
+++ b/tests/auto/quick/qquicktableview/data/delegatewithanchors.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/editdelegate.qml b/tests/auto/quick/qquicktableview/data/editdelegate.qml
index 8219aaa3b0..0c8bee2b27 100644
--- a/tests/auto/quick/qquicktableview/data/editdelegate.qml
+++ b/tests/auto/quick/qquicktableview/data/editdelegate.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
@@ -45,13 +45,13 @@ Item {
Component.onCompleted: {
tableView.editItem = editRoot
- tableView.editIndex = tableView.modelIndex(row, column)
+ tableView.editIndex = tableView.index(row, column)
selectAll()
}
Component.onDestruction: {
tableView.editItem = null
- tableView.editIndex = tableView.modelIndex(-1, -1)
+ tableView.editIndex = tableView.index(-1, -1)
}
}
}
diff --git a/tests/auto/quick/qquicktableview/data/editdelegate_combobox.qml b/tests/auto/quick/qquicktableview/data/editdelegate_combobox.qml
index b7de4cd406..c1344575ff 100644
--- a/tests/auto/quick/qquicktableview/data/editdelegate_combobox.qml
+++ b/tests/auto/quick/qquicktableview/data/editdelegate_combobox.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
@@ -47,12 +47,12 @@ Item {
Component.onCompleted: {
tableView.editItem = editRoot
- tableView.editIndex = tableView.modelIndex(row, column)
+ tableView.editIndex = tableView.index(row, column)
}
Component.onDestruction: {
tableView.editItem = null
- tableView.editIndex = tableView.modelIndex(-1, -1)
+ tableView.editIndex = tableView.index(-1, -1)
}
ComboBox {
diff --git a/tests/auto/quick/qquicktableview/data/forcelayout.qml b/tests/auto/quick/qquicktableview/data/forcelayout.qml
index d15587cb36..5beaf2bd25 100644
--- a/tests/auto/quick/qquicktableview/data/forcelayout.qml
+++ b/tests/auto/quick/qquicktableview/data/forcelayout.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/hiderowsandcolumns.qml b/tests/auto/quick/qquicktableview/data/hiderowsandcolumns.qml
index d0f5f06fcc..1a2737ad28 100644
--- a/tests/auto/quick/qquicktableview/data/hiderowsandcolumns.qml
+++ b/tests/auto/quick/qquicktableview/data/hiderowsandcolumns.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/iscolumnloaded.qml b/tests/auto/quick/qquicktableview/data/iscolumnloaded.qml
index df0b9d3bd2..84cbe981bd 100644
--- a/tests/auto/quick/qquicktableview/data/iscolumnloaded.qml
+++ b/tests/auto/quick/qquicktableview/data/iscolumnloaded.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
diff --git a/tests/auto/quick/qquicktableview/data/plaintableview.qml b/tests/auto/quick/qquicktableview/data/plaintableview.qml
index 840ef3c5d5..a18b1c03eb 100644
--- a/tests/auto/quick/qquicktableview/data/plaintableview.qml
+++ b/tests/auto/quick/qquicktableview/data/plaintableview.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
diff --git a/tests/auto/quick/qquicktableview/data/positionlast.qml b/tests/auto/quick/qquicktableview/data/positionlast.qml
new file mode 100644
index 0000000000..fcc2f34fae
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/positionlast.qml
@@ -0,0 +1,52 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ width: 300
+ height: 300
+
+ property alias tableView: tableView
+ property bool positionOnRowsChanged: false
+ property bool positionOnColumnsChanged: false
+ property bool positionOnContentHeightChanged: false
+ property bool positionOnContentWidthChanged: false
+
+ TableView {
+ id: tableView
+ anchors.fill: parent
+ clip: true
+
+ delegate: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 100
+ Text {
+ anchors.centerIn: parent
+ text: "row:" + row + "\ncol:" + column
+ font.pixelSize: 10
+ }
+ }
+
+ onRowsChanged: {
+ if (positionOnRowsChanged)
+ positionViewAtRow(rows - 1, TableView.AlignBottom)
+ }
+
+ onColumnsChanged: {
+ if (positionOnColumnsChanged)
+ positionViewAtColumn(columns - 1, TableView.AlignRight)
+ }
+
+ onContentHeightChanged: {
+ if (positionOnContentHeightChanged)
+ positionViewAtRow(rows - 1, TableView.AlignBottom)
+ }
+
+ onContentWidthChanged: {
+ if (positionOnContentWidthChanged)
+ positionViewAtColumn(columns - 1, TableView.AlignRight)
+ }
+ }
+
+}
diff --git a/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml b/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml
index 66887d8c6b..851fcb7310 100644
--- a/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml
+++ b/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/reordertableview.qml b/tests/auto/quick/qquicktableview/data/reordertableview.qml
new file mode 100644
index 0000000000..704126180f
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/reordertableview.qml
@@ -0,0 +1,52 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ width: 640
+ height: 450
+
+ property alias tableView: tableView
+ property real delegateWidth: 100
+ property real delegateHeight: 50
+ property Component delegate: tableViewDelegate
+ property bool delegateParentSetBeforeCompleted: false
+
+ TableView {
+ id: tableView
+ width: 600
+ height: 400
+ anchors.margins: 1
+ clip: true
+ delegate: tableViewDelegate
+ columnSpacing: 1
+ rowSpacing: 1
+ animate: false
+ }
+
+ Component {
+ id: tableViewDelegate
+ Rectangle {
+ required property int column
+ required property int row
+ objectName: "tableViewDelegate" + column + row
+ implicitWidth: delegateWidth
+ implicitHeight: delegateHeight
+ color: "lightgray"
+ border.width: 1
+
+ property string modelDataBinding: modelData
+
+ Text {
+ anchors.centerIn: parent
+ text: modelData
+ }
+
+ Component.onCompleted: {
+ delegateParentSetBeforeCompleted = parent != null;
+ }
+ }
+ }
+
+}
diff --git a/tests/auto/quick/qquicktableview/data/resetJsModelData.qml b/tests/auto/quick/qquicktableview/data/resetJsModelData.qml
new file mode 100644
index 0000000000..def5346147
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/resetJsModelData.qml
@@ -0,0 +1,19 @@
+import QtQuick
+
+Item {
+ width: 100
+ height: 300
+
+ property alias tableView: tableView
+
+ TableView {
+ id: tableView
+ anchors.fill: parent
+ property int modelUpdated: 0
+ onModelChanged: { ++modelUpdated }
+ delegate: Item {
+ implicitHeight: 10
+ implicitWidth: 10
+ }
+ }
+}
diff --git a/tests/auto/quick/qquicktableview/data/resetModelData.qml b/tests/auto/quick/qquicktableview/data/resetModelData.qml
new file mode 100644
index 0000000000..f7b3ec3009
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/resetModelData.qml
@@ -0,0 +1,25 @@
+import QtQuick
+
+Item {
+ width: 640
+ height: 450
+
+ property alias tableView: tableView
+
+ TableView {
+ id: tableView
+ anchors.fill: parent
+ height: 300
+ width: 200
+
+ property bool success: false
+
+ delegate: Rectangle {
+ required property var model
+ implicitWidth: 100
+ implicitHeight: 50
+ property var mydata: model?.custom ?? model.display
+ onMydataChanged: tableView.success = mydata === 42
+ }
+ }
+}
diff --git a/tests/auto/quick/qquicktableview/data/setcontentpos.qml b/tests/auto/quick/qquicktableview/data/setcontentpos.qml
index d1dc53bb98..69cf73164f 100644
--- a/tests/auto/quick/qquicktableview/data/setcontentpos.qml
+++ b/tests/auto/quick/qquicktableview/data/setcontentpos.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/sizefromdelegate.qml b/tests/auto/quick/qquicktableview/data/sizefromdelegate.qml
index 4a1ee32cdd..deb6b81f8e 100644
--- a/tests/auto/quick/qquicktableview/data/sizefromdelegate.qml
+++ b/tests/auto/quick/qquicktableview/data/sizefromdelegate.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/syncviewsimple.qml b/tests/auto/quick/qquicktableview/data/syncviewsimple.qml
index 880554b129..0fc2e6a819 100644
--- a/tests/auto/quick/qquicktableview/data/syncviewsimple.qml
+++ b/tests/auto/quick/qquicktableview/data/syncviewsimple.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.14
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml b/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml
index 6ab66984e7..f3563500c9 100644
--- a/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml
+++ b/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/tableviewfocus.qml b/tests/auto/quick/qquicktableview/data/tableviewfocus.qml
index 4bda963673..3bb7040e7f 100644
--- a/tests/auto/quick/qquicktableview/data/tableviewfocus.qml
+++ b/tests/auto/quick/qquicktableview/data/tableviewfocus.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml b/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml
index 8a0647f460..54414b6a71 100644
--- a/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml
+++ b/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/tableviewinteractive.qml b/tests/auto/quick/qquicktableview/data/tableviewinteractive.qml
new file mode 100644
index 0000000000..526313dc24
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/tableviewinteractive.qml
@@ -0,0 +1,32 @@
+import QtQuick
+import QtQuick.Controls
+
+Item {
+ id: rootItem
+
+ width: 200
+ height: 200
+ visible: true
+
+ property int eventCount: 0
+ property alias tableView: tableView
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: function(mouse) {
+ ++eventCount
+ }
+ }
+
+ TableView {
+ id: tableView
+ objectName: "tableView"
+ anchors.fill: parent
+ model: 1
+ delegate: Rectangle {
+ color: "red"
+ implicitWidth: 200
+ implicitHeight: 200
+ }
+ }
+}
diff --git a/tests/auto/quick/qquicktableview/data/tableviewwithselected1.qml b/tests/auto/quick/qquicktableview/data/tableviewwithselected1.qml
index 0e0b8f20bb..f0396c2c34 100644
--- a/tests/auto/quick/qquicktableview/data/tableviewwithselected1.qml
+++ b/tests/auto/quick/qquicktableview/data/tableviewwithselected1.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
diff --git a/tests/auto/quick/qquicktableview/data/tableviewwithselected2.qml b/tests/auto/quick/qquicktableview/data/tableviewwithselected2.qml
index 5892a72be4..489a00b3f8 100644
--- a/tests/auto/quick/qquicktableview/data/tableviewwithselected2.qml
+++ b/tests/auto/quick/qquicktableview/data/tableviewwithselected2.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
diff --git a/tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml b/tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml
index d60e9d0b1e..e0e9c01908 100644
--- a/tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml
+++ b/tests/auto/quick/qquicktableview/data/tweakimplicitsize.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/unloadheader.qml b/tests/auto/quick/qquicktableview/data/unloadheader.qml
new file mode 100644
index 0000000000..5b15e4c752
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/unloadheader.qml
@@ -0,0 +1,43 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import Qt.labs.qmlmodels
+
+Item {
+ width: 640
+ height: 480
+
+ property alias tableView: tableView
+ property alias loader: verticalHeaderLoader
+
+ Loader {
+ id: verticalHeaderLoader
+ x: 0
+ width: item ? item.contentWidth : 0
+ height: parent.height
+ sourceComponent: TableView {
+ model: 5
+ syncView: tableView
+ syncDirection: Qt.Vertical
+ delegate: Text {
+ text: index
+ }
+ }
+ }
+
+ TableView {
+ id: tableView
+ anchors {
+ left: verticalHeaderLoader.right
+ right: parent.right
+ top: parent.top
+ bottom: parent.bottom
+ }
+
+ model: 5
+ delegate: Text {
+ text: index
+ }
+ }
+}
diff --git a/tests/auto/quick/qquicktableview/data/usechooserwithoutdefault.qml b/tests/auto/quick/qquicktableview/data/usechooserwithoutdefault.qml
index 48d28b0766..4ff2a7401f 100644
--- a/tests/auto/quick/qquicktableview/data/usechooserwithoutdefault.qml
+++ b/tests/auto/quick/qquicktableview/data/usechooserwithoutdefault.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml b/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml
index c118077b14..65d918e072 100644
--- a/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml
+++ b/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml b/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml
index 3e3ed9ab94..686bed12d0 100644
--- a/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml
+++ b/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.12
import QtQuick.Window 2.3
diff --git a/tests/auto/quick/qquicktableview/data/zerosizedtableview.qml b/tests/auto/quick/qquicktableview/data/zerosizedtableview.qml
index c8d6168b81..b885684b18 100644
--- a/tests/auto/quick/qquicktableview/data/zerosizedtableview.qml
+++ b/tests/auto/quick/qquicktableview/data/zerosizedtableview.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
@@ -15,6 +15,14 @@ Item {
width: 0
height: 0
delegate: tableViewDelegate
+
+ Component.onCompleted: {
+ positionViewAtCell(
+ Qt.point(0,0),
+ TableView.AlignHCenter,
+ Qt.point(-5,-5)
+ );
+ }
}
Component {
diff --git a/tests/auto/quick/qquicktableview/data/zerosizedviewport.qml b/tests/auto/quick/qquicktableview/data/zerosizedviewport.qml
new file mode 100644
index 0000000000..f32c7bd3b2
--- /dev/null
+++ b/tests/auto/quick/qquicktableview/data/zerosizedviewport.qml
@@ -0,0 +1,31 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Window
+
+Item {
+ width: 640
+ height: 450
+
+ property alias tableView: tableView
+
+ TableView {
+ id: tableView
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ width: contentWidth
+ delegate: tableViewDelegate
+ }
+
+ Component {
+ id: tableViewDelegate
+ Rectangle {
+ objectName: "tableViewDelegate"
+ implicitWidth: tableView.width
+ implicitHeight: 50
+ }
+ }
+
+}