diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-04-20 11:40:40 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-20 08:05:15 +0200 |
commit | 04794c29cee0d97fb3b32e1c71a072e34ee37e9c (patch) | |
tree | b161691c1af10d24432e2cc8ba753a80c3adc7ab /tests/auto/quick/qquickitem2/data | |
parent | 2e0a348927d5d9ad47cad724bc687c72e592c8d6 (diff) |
Fix eliding when text width is reset by an implicitWidth change.
After emitting implicit size changed signals, reevaluate any conditions
that were dependent on the validity of the item dimensions.
Change-Id: Ie4ee0c87a22cf82752c207c69d426056c36ede67
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickitem2/data')
-rw-r--r-- | tests/auto/quick/qquickitem2/data/implicitsize.qml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/data/implicitsize.qml b/tests/auto/quick/qquickitem2/data/implicitsize.qml index cc6aaf7d60..756e230a87 100644 --- a/tests/auto/quick/qquickitem2/data/implicitsize.qml +++ b/tests/auto/quick/qquickitem2/data/implicitsize.qml @@ -16,4 +16,19 @@ Item { implicitWidth = 150 implicitHeight = 80 } + + function increaseImplicit() { + implicitWidth = 200 + implicitHeight = 100 + } + + function assignImplicitBinding() { + width = Qt.binding(function() { return implicitWidth < 175 ? implicitWidth : 175 }) + height = Qt.binding(function() { return implicitHeight < 90 ? implicitHeight : 90 }) + } + + function assignUndefinedBinding() { + width = Qt.binding(function() { return implicitWidth < 175 ? undefined : 175 }) + height = Qt.binding(function() { return implicitHeight < 90 ? undefined : 90 }) + } } |