Merge remote-tracking branch 'origin/16.0'

Change-Id: Ie8a58fc3a9cda541d83b4380b63536bcf4c66c76
This commit is contained in:
Eike Ziller
2025-04-25 09:00:10 +02:00

View File

@@ -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) {