feature/add_treewidget_enter_event_compat (#2323)

* feature/add_treewidget_enter_event_compat

* restore
This commit is contained in:
chendapao 2023-01-06 10:27:58 +08:00 committed by GitHub
parent f764fec458
commit d499b0d7be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ void TreeWidget::keyPressEvent(QKeyEvent *p_event)
// On Mac OS X, it is `Command+O` to activate an item, instead of Return.
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
if (p_event->key() == Qt::Key_Return) {
if (p_event->key() == Qt::Key_Return || p_event->key() == Qt::Key_Enter) {
if (auto item = currentItem()) {
emit itemActivated(item, currentColumn());
}