| 445 | } |
| 446 | |
| 447 | void ProjectTreeView::keyPressEvent(QKeyEvent* event) |
| 448 | { |
| 449 | if (event->key() == Qt::Key_Return && currentIndex().isValid() && state()!=QAbstractItemView::EditingState) |
| 450 | { |
| 451 | event->accept(); |
| 452 | slotActivated(currentIndex()); |
| 453 | } |
| 454 | else |
| 455 | QTreeView::keyPressEvent(event); |
| 456 | } |
| 457 | |
| 458 | void ProjectTreeView::drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const |
| 459 | { |