diff options
| author | Méven Car <[email protected]> | 2023-09-02 11:30:25 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-09-02 14:42:54 +0200 |
| commit | fae5fec96454fbc848f5402b1d1d758bd7ff2d8d (patch) | |
| tree | 7ea84a5ae4e8e8d2b8dd7455bf17174c848aa420 /src/kitemviews/kitemlistcontainer.cpp | |
| parent | 012f8a224ab83ba4337bdb99bf7c8566e365c14e (diff) | |
Add focusOut and focusIn event support for KFileItemListView and update selected widget on focus change
Diffstat (limited to 'src/kitemviews/kitemlistcontainer.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistcontainer.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp index 3893ceaea..f89a6c8ce 100644 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@ -175,6 +175,22 @@ void KItemListContainer::wheelEvent(QWheelEvent *event) smoothScroller->handleWheelEvent(event); } +void KItemListContainer::focusInEvent(QFocusEvent *event) +{ + KItemListView *view = m_controller->view(); + if (view) { + QApplication::sendEvent(view, event); + } +} + +void KItemListContainer::focusOutEvent(QFocusEvent *event) +{ + KItemListView *view = m_controller->view(); + if (view) { + QApplication::sendEvent(view, event); + } +} + void KItemListContainer::slotScrollOrientationChanged(Qt::Orientation current, Qt::Orientation previous) { Q_UNUSED(previous) |
