Fixes: - Using Return in project tree on Mac to open files

This commit is contained in:
con
2008-12-10 17:24:06 +01:00
parent d454607264
commit 0343c8bf2d

View File

@@ -90,6 +90,20 @@ protected:
if (event->reason() != Qt::PopupFocusReason)
QTreeView::focusOutEvent(event);
}
#ifdef Q_OS_MAC
void keyPressEvent(QKeyEvent *event)
{
if ((event->key() == Qt::Key_Return
|| event->key() == Qt::Key_Enter)
&& event->modifiers() == 0
&& currentIndex().isValid()) {
emit activated(currentIndex());
return;
}
QTreeView::keyPressEvent(event);
}
#endif
};
/*!