diff options
author | Michael Brasser <michael.brasser@live.com> | 2013-11-07 01:29:01 -0600 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-02 22:27:48 +0100 |
commit | 204500b6f5133a56d32799581543fbcdd4095545 (patch) | |
tree | 9b05f40acd9c0ff3d629ec50001aee81eea1daf6 /tests/auto/quick/qquicktext | |
parent | f7fc7e1a7f36485642c5c44af31a67986f006cf8 (diff) |
Ensure correct horizontal alignment for implicit width multiline text.
Task-number: QTBUG-30896
Change-Id: I5ca18ac67cf3640c97374d79f2546fc53698f86b
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'tests/auto/quick/qquicktext')
-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); |