diff options
Diffstat (limited to 'tests/auto/quick/qquicktext/tst_qquicktext.cpp')
-rw-r--r-- | tests/auto/quick/qquicktext/tst_qquicktext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index dfbd190a65..82a1e21764 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -902,6 +902,8 @@ void tst_qquicktext::hAlignImplicitWidth() { // HCenter Align text->setHAlign(QQuickText::AlignHCenter); + text->setText("Reset"); // set dummy string to force relayout once original text is set again + text->setText("AA\nBBBBBBB\nCCCCCCCCCCCCCCCC"); QImage image = view.grabWindow(); const int left = numberOfNonWhitePixels(centeredSection1, centeredSection2, image); const int mid = numberOfNonWhitePixels(centeredSection2, centeredSection3, image); @@ -912,6 +914,8 @@ void tst_qquicktext::hAlignImplicitWidth() { // Right Align text->setHAlign(QQuickText::AlignRight); + text->setText("Reset"); // set dummy string to force relayout once original text is set again + text->setText("AA\nBBBBBBB\nCCCCCCCCCCCCCCCC"); QImage image = view.grabWindow(); const int left = numberOfNonWhitePixels(centeredSection1, centeredSection2, image); const int mid = numberOfNonWhitePixels(centeredSection2, centeredSection3, image); |