| 69 | } |
| 70 | |
| 71 | void selectFirstItem() override |
| 72 | { |
| 73 | if (model()->rowCount() > 0) { |
| 74 | QModelIndex top = indexAt(rect().topLeft()); |
| 75 | if (top.isValid()) { |
| 76 | selectionModel()->select(top, QItemSelectionModel::ClearAndSelect); |
| 77 | setCurrentIndex(top); |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | void activateFirstItem() override |
| 83 | { |