diff options
author | hjk <qthjk@ovi.com> | 2012-08-28 09:33:09 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-02 10:09:28 +0200 |
commit | 9d4814e18b9c243340f492f8b7ddd19b523b229f (patch) | |
tree | 219180a1d028ddc83861455dd31dbfefa33b64bc /src/widgets/widgets/qplaintextedit.h | |
parent | e0ce39ea675bd1395618207d14089a234c9dd3c8 (diff) |
Introduce hook for text cursor changes in QTextEdit and QPlainTextEdit
Currently it is hard for Q{Plain}TextEdit subclasses to keep track
of changes of the text cursor by direct calls to setTextCursor from
arbitrary code. By redirecting the setTextCursor to a virtual
function subclasses get the chance to intercept such calls.
Change-Id: Id92d9c86928b97285b0f5b7b39790442dfac3e50
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/widgets/qplaintextedit.h')
-rw-r--r-- | src/widgets/widgets/qplaintextedit.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qplaintextedit.h b/src/widgets/widgets/qplaintextedit.h index b7395d3c39..628e4a87a2 100644 --- a/src/widgets/widgets/qplaintextedit.h +++ b/src/widgets/widgets/qplaintextedit.h @@ -254,6 +254,7 @@ protected: QPlainTextEdit(QPlainTextEditPrivate &dd, QWidget *parent); virtual void scrollContentsBy(int dx, int dy); + virtual void doSetTextCursor(const QTextCursor &cursor); QTextBlock firstVisibleBlock() const; QPointF contentOffset() const; |