summaryrefslogtreecommitdiff
path: root/src/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls')
-rw-r--r--src/controls/TreeView.qml8
-rw-r--r--src/controls/doc/src/qtquickcontrolsstyles-index.qdoc4
2 files changed, 9 insertions, 3 deletions
diff --git a/src/controls/TreeView.qml b/src/controls/TreeView.qml
index 6a38acff..2bedb9e6 100644
--- a/src/controls/TreeView.qml
+++ b/src/controls/TreeView.qml
@@ -49,7 +49,7 @@ BasicTableView {
property var model: null
property alias rootIndex: modelAdaptor.rootIndex
- readonly property var currentIndex: modelAdaptor.mapRowToModelIndex(__currentRow)
+ readonly property var currentIndex: modelAdaptor.updateCount, modelAdaptor.mapRowToModelIndex(__currentRow)
property ItemSelectionModel selection: null
signal activated(var index)
@@ -96,6 +96,12 @@ BasicTableView {
id: modelAdaptor
model: root.model
+ // Hack to force re-evaluation of the currentIndex binding
+ property int updateCount: 0
+ onModelReset: updateCount++
+ onRowsInserted: updateCount++
+ onRowsRemoved: updateCount++
+
onExpanded: root.expanded(index)
onCollapsed: root.collapsed(index)
}
diff --git a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
index 9333ee27..c86488fa 100644
--- a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
+++ b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
@@ -60,7 +60,7 @@
\title Qt Quick Controls 1 Styles
\brief The Qt Quick Controls Styles submodule provides custom styles for Qt Quick Controls.
- \deprecation-warning
+ \deprecationwarning
The Qt Quick Controls Styles submodule allows custom styling for \l {Qt Quick Controls 1}.
@@ -132,7 +132,7 @@
\ingroup qmlmodules
\brief Provides QML types for Qt Quick Controls styles.
- \deprecation-warning
+ \deprecationwarning
The \l{Qt Quick Controls 1} module provides a set of QML types for handling
styles.