mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
feature/add_treewidget_enter_event_compat (#2323)
* feature/add_treewidget_enter_event_compat * restore
This commit is contained in:
parent
f764fec458
commit
d499b0d7be
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user