diff options
Diffstat (limited to 'src/gui/itemviews/qabstractitemview.cpp')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 2faf755..0f99949 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -2090,7 +2090,7 @@ void QAbstractItemView::focusInEvent(QFocusEvent *event) bool autoScroll = d->autoScroll; d->autoScroll = false; QModelIndex index = moveCursor(MoveNext, Qt::NoModifier); // first visible index - if (index.isValid() && d->isIndexEnabled(index)) + if (index.isValid() && d->isIndexEnabled(index) && event->reason() != Qt::MouseFocusReason) selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate); d->autoScroll = autoScroll; } @@ -2297,6 +2297,8 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event) case Qt::Key_Escape: case Qt::Key_Shift: case Qt::Key_Control: + case Qt::Key_Delete: + case Qt::Key_Backspace: event->ignore(); break; case Qt::Key_Space: |