summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/fx/qfxtextedit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp
index 79e1a3f..5492aaa 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/fx/qfxtextedit.cpp
@@ -871,9 +871,13 @@ void QFxTextEditPrivate::init()
void QFxTextEdit::q_textChanged()
{
+ if (!widthValid())
+ updateSize(); //### optimize: we get 3 calls to updateSize every time a letter is typed
emit textChanged(text());
}
+//### we should perhaps be a bit smarter here -- depending on what has changed, we shouldn't
+// need to do all the calculations each time
void QFxTextEdit::updateSize()
{
Q_D(QFxTextEdit);