diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-05-07 10:16:06 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-05-07 10:39:29 +0200 |
commit | a454cd9981d85ff1300ab8ab5ea5a38a2f4e39e7 (patch) | |
tree | a2b89a7c3f6e8984fc9f8ebe21c251c1e46cfe00 /examples/treeview | |
parent | e9d63ab19e1e120d89a2baeafc39027a218a3ede (diff) |
Don't assign TreeView.view to a CustomTreeView pointer
CustomTreeView doesn't inherit from TreeView, but from
TreeViewTemplate. So you cannot assign CustomTreeView
to a TreeView pointer.
This patch changes the type from TreeView to CustomTreeView
to fix a run-time warning about this.
Fixes: QTEXT-2
Change-Id: I230ac6412cf9b205741c57f6b62f9e2e751d7799
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'examples/treeview')
-rw-r--r-- | examples/treeview/customdelegate/CustomTreeView.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/treeview/customdelegate/CustomTreeView.qml b/examples/treeview/customdelegate/CustomTreeView.qml index a10b1f7..94823cd 100644 --- a/examples/treeview/customdelegate/CustomTreeView.qml +++ b/examples/treeview/customdelegate/CustomTreeView.qml @@ -144,7 +144,7 @@ TreeViewTemplate { implicitHeight: Math.max(indicator.height, treeNodeLabel.height) color: d.bgColor(column, row) - property TreeView view: TreeView.view + property CustomTreeView view: TreeView.view property bool hasChildren: TreeView.hasChildren property bool isExpanded: TreeView.isExpanded property int depth: TreeView.depth |