eat tooltip events when control is pressed, otherwise the tools

destroy the navigation experience
This commit is contained in:
mae
2009-04-24 18:16:30 +02:00
parent 7f64e11cc1
commit 8d59b0ab64

View File

@@ -1480,6 +1480,8 @@ bool BaseTextEditor::viewportEvent(QEvent *event)
setTextCursor(cursorForPosition(ce->pos()));
} else if (event->type() == QEvent::ToolTip) {
const QHelpEvent *he = static_cast<QHelpEvent*>(event);
if (QApplication::keyboardModifiers() & Qt::ControlModifier)
return true; // eat tooltip event when control is pressed
const QPoint &pos = he->pos();
// Allow plugins to show tooltips