Relayout the text after the vertical alignment is changed
authorMarco Bubke <marco.bubke@digia.com>
Wed, 26 Jun 2013 13:28:13 +0000 (15:28 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 1 Jul 2013 10:33:09 +0000 (12:33 +0200)
In the designer it is no working without a layout update.

Task-number: QTBUG-32041
Change-Id: I2276914c81b38ad8931109b3d800b65a0d11bca7
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
src/quick/items/qquicktext.cpp

index b46f2e5..39bdb90 100644 (file)
@@ -1793,6 +1793,10 @@ void QQuickText::setVAlign(VAlignment align)
         return;
 
     d->vAlign = align;
+
+    if (isComponentComplete())
+        d->updateLayout();
+
     emit verticalAlignmentChanged(align);
 }