From 9d4814e18b9c243340f492f8b7ddd19b523b229f Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 28 Aug 2012 09:33:09 +0200 Subject: 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 Reviewed-by: Lars Knoll --- src/widgets/widgets/qtextedit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qtextedit.h') diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h index ab0a5aeb7c..e2c294ca86 100644 --- a/src/widgets/widgets/qtextedit.h +++ b/src/widgets/widgets/qtextedit.h @@ -296,7 +296,7 @@ protected: QTextEdit(QTextEditPrivate &dd, QWidget *parent); virtual void scrollContentsBy(int dx, int dy); - + virtual void doSetTextCursor(const QTextCursor &cursor); private: Q_DISABLE_COPY(QTextEdit) -- cgit v1.2.3