TextEditor: improve line column button tooltip

Automatically hide the tooltip of the line column button in the editor
toolbar when the cursor leaves the widget.

Change-Id: Ia17f40029d0821584c8a804b44431a5d7e639066
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2024-01-08 12:53:49 +01:00
parent ab79d1f970
commit 419eae839a

View File

@@ -207,6 +207,9 @@ void LineColumnButton::update()
bool LineColumnButton::event(QEvent *event) bool LineColumnButton::event(QEvent *event)
{ {
if (event->type() == QEvent::Leave)
ToolTip::hideImmediately();
if (event->type() != QEvent::ToolTip) if (event->type() != QEvent::ToolTip)
return QToolButton::event(event); return QToolButton::event(event);