aboutsummaryrefslogtreecommitdiffstats
diff options
authorEike Ziller <eike.ziller@qt.io>2025-04-25 09:00:10 +0200
committerEike Ziller <eike.ziller@qt.io>2025-04-25 09:00:10 +0200
commitce8269d4571bfdbd0d976c1883fbdd107adb4d60 (patch)
tree90c61d6e9540d1197a98c19cafedfc8e827f7193
parent8f374f891b411e62e34677488c74edd05fa89792 (diff)
parenta62460fb1c969c8f825d54cc1695e738bcffdfcd (diff)
Merge remote-tracking branch 'origin/16.0'HEADmaster
-rw-r--r--src/plugins/texteditor/texteditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 01597e8f7e4..fbfd9277e8c 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -4985,7 +4985,7 @@ bool TextEditorWidget::viewportEvent(QEvent *event)
// Only handle tool tip for text cursor if mouse is within the block for the text cursor,
// and not if the mouse is e.g. in the empty space behind a short line.
if (line.isValid()) {
- const QRectF blockGeometry = blockBoundingGeometry(block);
+ const QRectF blockGeometry = blockBoundingGeometry(block).translated(contentOffset());
const int width = block == d->m_suggestionBlock ? blockGeometry.width()
: line.naturalTextRect().right();
if (pos.x() <= blockGeometry.left() + width) {
close