aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-07-10 11:14:42 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-07-10 12:39:52 +0000
commit58c988e090bac094e8c2e8b77975c1c720725a6e (patch)
tree6100f317fc1a8a8c15e20154506f39411724a78e /tests/manual
parent04e7882fc2044020f98c9f6507429a47981f222b (diff)
TableView: remove row and column from attached object
TableView.row and TableView.column is no different from the row and column properties that are injected into the context from the model classes. So just remove them to not bloat the API. This attached properties where added at an early stage where we thought that it should be possible to set a different row and column count on the view than compared to the model (to e.g to "fake" a table layout when just assigning an integer as a model). Also, we consider supporting right-to-left etc, where we might end up with cells that have a different row/column in the view compared to where the cell is in the model. If we decide to do this later (not for the first release), we can consider adding the attached properties back again at that point. Change-Id: I588a45913b968db789978339bc9a63cd2ccfad49 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/tableview/abstracttablemodel/main.qml4
-rw-r--r--tests/manual/tableview/listmodel/main.qml2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/manual/tableview/abstracttablemodel/main.qml b/tests/manual/tableview/abstracttablemodel/main.qml
index c448815a7c..271752aaf1 100644
--- a/tests/manual/tableview/abstracttablemodel/main.qml
+++ b/tests/manual/tableview/abstracttablemodel/main.qml
@@ -76,8 +76,8 @@ Window {
Component {
id: tableViewDelegate
Rectangle {
- TableView.cellWidth: TableView.column % 3 ? 80 : 50
- TableView.cellHeight: TableView.row % 3 ? 80 : 50
+ TableView.cellWidth: column % 3 ? 80 : 50
+ TableView.cellHeight: row % 3 ? 80 : 50
Text {
anchors.centerIn: parent
diff --git a/tests/manual/tableview/listmodel/main.qml b/tests/manual/tableview/listmodel/main.qml
index b5a1ab8379..ca39e6a2b9 100644
--- a/tests/manual/tableview/listmodel/main.qml
+++ b/tests/manual/tableview/listmodel/main.qml
@@ -77,7 +77,7 @@ Window {
Text {
anchors.centerIn: parent
- text: name + "\n[" + tableDelegate.TableView.column + ", " + tableDelegate.TableView.row + "]"
+ text: name + "\n[" + column + ", " + row + "]"
}
}
}