[vlc-commits] qml: restore KeyNavigableListView inner focus after header gained focus
    Pierre Lamot 
    git at videolan.org
       
    Fri Jan 10 15:06:24 CET 2020
    
    
  
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Dec 13 10:12:20 2019 +0100| [cbb45e2041d0fdd069daedc52284fe85ed3a7796] | committer: Jean-Baptiste Kempf
qml: restore KeyNavigableListView inner focus after header gained focus
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cbb45e2041d0fdd069daedc52284fe85ed3a7796
---
 modules/gui/qt/widgets/qml/KeyNavigableListView.qml | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
index bc28d98959..0ecc2ef8d1 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
@@ -87,6 +87,16 @@ NavigableFocusScope {
         }
     }
 
+
+    Connections {
+        target: view.headerItem
+        onFocusChanged: {
+            if (!headerItem.focus) {
+                view.currentItem.focus = true
+            }
+        }
+    }
+
     ListView {
         id: view
         anchors.fill: parent
    
    
More information about the vlc-commits
mailing list