summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgettextcontrol_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-10 12:45:15 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-24 12:36:41 +0100
commitb26dc9bc05a052ddc24c4aa444e87cef9b5564f2 (patch)
treed552b17318fac0e4b26df5d11dc34b9ba16faf2a /src/widgets/widgets/qwidgettextcontrol_p.h
parent7414c2c404cc241b1dbfa2d15aee2917a3b0cfb2 (diff)
QPlainTextEditControl: reimplement anchorAt()
See comments in QPlainTextDocumentLayout::hitTest(). Since QPlainTextEdit does not do hit testing on the document layout level, allow QPlainTextEditControl to override anchorAt() so that hit testing can be done on the widget level instead. Change-Id: I70247eafae96897382a0c7db7d596128a03e7a6c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/widgets/widgets/qwidgettextcontrol_p.h')
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h
index 79f4e404a2..fb16e7e3c4 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p.h
@@ -124,7 +124,7 @@ public:
QRectF selectionRect(const QTextCursor &cursor) const;
QRectF selectionRect() const;
- QString anchorAt(const QPointF &pos) const;
+ virtual QString anchorAt(const QPointF &pos) const;
QPointF anchorPosition(const QString &name) const;
QString anchorAtCursor() const;