diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/Roster/QtFilterWidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/QtUI/Roster/QtFilterWidget.cpp b/Swift/QtUI/Roster/QtFilterWidget.cpp index 64eb312..78949f2 100644 --- a/Swift/QtUI/Roster/QtFilterWidget.cpp +++ b/Swift/QtUI/Roster/QtFilterWidget.cpp @@ -66,7 +66,8 @@ bool QtFilterWidget::eventFilter(QObject*, QEvent* event) { return false; } else if (keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyPress) { isModifierSinglePressed_ = true; - } else if (keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyRelease && isModifierSinglePressed_) { + } else if ((keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyRelease && isModifierSinglePressed_) + || (keyEvent->key() == Qt::Key_Menu)) { QPoint itemOffset(2,2); QPoint contextMenuPosition = treeView_->visualRect(treeView_->currentIndex()).topLeft() + itemOffset;; QApplication::postEvent(treeView_, new QContextMenuEvent(QContextMenuEvent::Keyboard, contextMenuPosition, treeView_->mapToGlobal(contextMenuPosition))); |