From 91ba9959e4339dc547cea98a15d2aac011ac060e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 1 Dec 2009 13:01:16 +1000 Subject: Make focusOnPress the default behaviour for TextEdit (like TextInput). --- src/declarative/graphicsitems/qmlgraphicstextedit.cpp | 2 +- src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp index 5f5269f..3521638 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp @@ -562,7 +562,7 @@ QString QmlGraphicsTextEdit::selectedText() const \qmlproperty bool TextEdit::focusOnPress Whether the TextEdit should gain focus on a mouse press. By default this is - set to false. + set to true. */ bool QmlGraphicsTextEdit::focusOnPress() const { diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h b/src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h index 4cbc56d..6541921 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h +++ b/src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h @@ -69,7 +69,7 @@ class QmlGraphicsTextEditPrivate : public QmlGraphicsPaintedItemPrivate public: QmlGraphicsTextEditPrivate() : color("black"), imgDirty(true), hAlign(QmlGraphicsTextEdit::AlignLeft), vAlign(QmlGraphicsTextEdit::AlignTop), - dirty(false), wrap(false), richText(false), cursorVisible(false), focusOnPress(false), + dirty(false), wrap(false), richText(false), cursorVisible(false), focusOnPress(true), persistentSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), cursorComponent(0), cursor(0), format(QmlGraphicsTextEdit::AutoText), document(0) { -- cgit v0.12