diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-05-04 12:48:42 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-05-28 09:29:47 +0000 |
commit | 7dc48bb0b56de00faab2d67570c74f0512991263 (patch) | |
tree | 02176c42c3c630bea9fb1646a900bf8f3f35f1b1 /tests/auto/quick/qquicktableview | |
parent | 61bbac145a6d69ab07e74b2f54ba1257bd6c3721 (diff) |
TableView: switch to use TableView.cellWidth/cellHeight
This is logically more correct since TableView will override
width / height anyway to make the delegates fit into the table if
they are not as wide/tall as the widest column/row.
And it gets even more problematic when we recycle delegates, since
in that case we need to keep the original width binding of the
delegate to calulate the size of new columns. And this all
fits better by using attached properties instead.
Change-Id: Ia5f2acd2bfc45f3fb160c3782191ad8da9f780e6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicktableview')
-rw-r--r-- | tests/auto/quick/qquicktableview/data/countingtableview.qml | 4 | ||||
-rw-r--r-- | tests/auto/quick/qquicktableview/data/plaintableview.qml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/quick/qquicktableview/data/countingtableview.qml b/tests/auto/quick/qquicktableview/data/countingtableview.qml index 1e8e9f43fb..d8315be54f 100644 --- a/tests/auto/quick/qquicktableview/data/countingtableview.qml +++ b/tests/auto/quick/qquicktableview/data/countingtableview.qml @@ -64,8 +64,8 @@ Item { id: tableViewDelegate Rectangle { objectName: "tableViewDelegate" - implicitWidth: 100 - implicitHeight: 50 + TableView.cellWidth: 100 + TableView.cellHeight: 50 color: "lightgray" border.width: 1 Text { diff --git a/tests/auto/quick/qquicktableview/data/plaintableview.qml b/tests/auto/quick/qquicktableview/data/plaintableview.qml index a073941faa..7668f0ca01 100644 --- a/tests/auto/quick/qquicktableview/data/plaintableview.qml +++ b/tests/auto/quick/qquicktableview/data/plaintableview.qml @@ -66,8 +66,8 @@ Item { id: tableViewDelegate Rectangle { objectName: "tableViewDelegate" - implicitWidth: delegateWidth - implicitHeight: delegateHeight + TableView.cellWidth: delegateWidth + TableView.cellHeight: delegateHeight color: "lightgray" border.width: 1 Text { |