[vlc-commits] qml: attach index property to column items of KeyNavigableTableView

Prince Gupta git at videolan.org
Thu Aug 27 12:44:15 CEST 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Wed Aug 19 18:28:59 2020 +0530| [7d53a42c8ae8ed5e090ce9fd8193a463a1b4f1fc] | committer: Pierre Lamot

qml: attach index property to column items of KeyNavigableTableView

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d53a42c8ae8ed5e090ce9fd8193a463a1b4f1fc
---

 modules/gui/qt/widgets/qml/KeyNavigableTableView.qml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
index adfb4fbe9d..8564a4779b 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
@@ -184,6 +184,7 @@ NavigableFocusScope {
             property bool selected: selectionDelegateModel.isSelected(root.model.index(index, 0))
             property alias showSeparator: separator.visible
             readonly property bool highlighted: selected || hoverArea.containsMouse || activeFocus
+            readonly property int _index: index
 
             width: view.width
             height: root.rowHeight
@@ -267,6 +268,7 @@ NavigableFocusScope {
                                 property var colModel: modelData
                                 readonly property bool currentlyFocused: lineView.activeFocus
                                 readonly property bool containsMouse: hoverArea.containsMouse
+                                readonly property int index: lineView._index
 
                                 anchors.fill: parent
                                 sourceComponent: colModel.colDelegate || root.colDelegate



More information about the vlc-commits mailing list