| 522 | } |
| 523 | |
| 524 | void Editor::triggerToolTipByKeyboard() |
| 525 | { |
| 526 | QTextCursor cursor = textCursor(); |
| 527 | |
| 528 | QString tooltip = predefinedTooltipAtPosition(cursor.position()); |
| 529 | if (!tooltip.isEmpty()) { |
| 530 | popupToolTip(EditorToolTip::BY_KEYBOARD, cursor.position(), tooltip); |
| 531 | return; |
| 532 | } |
| 533 | |
| 534 | d_pendingTooltip = std::make_pair(cursor, EditorToolTip::BY_KEYBOARD); |
| 535 | Q_EMIT toolTipRequested(cursor.blockNumber(), cursor.positionInBlock()); |
| 536 | } |
| 537 | |
| 538 | void Editor::handleToolTipEvent(QHelpEvent* event) |
| 539 | { |