diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-06-03 02:05:59 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-06-03 02:05:59 (GMT) |
commit | 5ee5a67cfb74a3b6d0e1fc781352302e7216cbef (patch) | |
tree | f620a638d3ff6ef667c3b7befb8ba55f6536f13a /src/declarative/fx/qfxtextedit.cpp | |
parent | bb30e5e9e3d46c4e532d397db80ff90384b8b453 (diff) | |
download | Qt-5ee5a67cfb74a3b6d0e1fc781352302e7216cbef.zip Qt-5ee5a67cfb74a3b6d0e1fc781352302e7216cbef.tar.gz Qt-5ee5a67cfb74a3b6d0e1fc781352302e7216cbef.tar.bz2 |
Resize TextEdit as text changes if no explicit width has been set.
Diffstat (limited to 'src/declarative/fx/qfxtextedit.cpp')
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 4 |
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); |