aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput_p_p.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-03-22 12:04:16 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-22 04:06:12 +0100
commit336c338c9f48c4d3150a1a31f67132988c7d410a (patch)
treee61cbaf763646a921741826a08e66595f5c87dbf /src/quick/items/qquicktextinput_p_p.h
parent793a01d28fb5f0b99b638332214b2267c2ca29db (diff)
Fix text wrapping and eliding with implicitWidth.
Update the implicitWidth of the item before continuing with the layout rather than after it's completed this gives any bindings dependent on the implicitWidth the opportunity to update the width before the layout continues. Task-number: QTBUG-22680 Task-number: QTBUG-24251 Change-Id: I61cd96ad9891b22d8b83937ad2c06719f88976b6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextinput_p_p.h')
-rw-r--r--src/quick/items/qquicktextinput_p_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index bb00600661..165155acd0 100644
--- a/src/quick/items/qquicktextinput_p_p.h
+++ b/src/quick/items/qquicktextinput_p_p.h
@@ -125,6 +125,8 @@ public:
, m_acceptableInput(1)
, m_blinkStatus(0)
, m_passwordEchoEditing(false)
+ , inLayout(false)
+ , requireImplicitWidth(false)
{
}
@@ -256,7 +258,8 @@ public:
bool m_acceptableInput : 1;
bool m_blinkStatus : 1;
bool m_passwordEchoEditing : 1;
-
+ bool inLayout:1;
+ bool requireImplicitWidth:1;
static inline QQuickTextInputPrivate *get(QQuickTextInput *t) {
return t->d_func();
@@ -404,6 +407,8 @@ public:
void updateLayout();
+ qreal getImplicitWidth() const;
+
private:
void removeSelectedText();
void internalSetText(const QString &txt, int pos = -1, bool edited = true);