summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-17 11:49:39 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-17 11:49:39 (GMT)
commit39e13f96004d520bb2124e1f7bf9ff8fcc04f6b8 (patch)
tree4dca7700afb4364b25329d4b94669035d114122a /tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
parentc9aa27d0ae9f3492c19da1e4c75178b8fcb764be (diff)
downloadQt-39e13f96004d520bb2124e1f7bf9ff8fcc04f6b8.zip
Qt-39e13f96004d520bb2124e1f7bf9ff8fcc04f6b8.tar.gz
Qt-39e13f96004d520bb2124e1f7bf9ff8fcc04f6b8.tar.bz2
More tests for setSpacing
Diffstat (limited to 'tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp')
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 16a9af2..57f04cc 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -736,6 +736,21 @@ void tst_QGraphicsAnchorLayout::setSpacing()
QCOMPARE(a->geometry(), QRectF(0, 0, 20, 20));
QCOMPARE(b->geometry(), QRectF(21, 0, 20, 20));
QCOMPARE(c->geometry(), QRectF(0, 21, 41, 20));
+
+ l->setHorizontalSpacing(4);
+ QApplication::processEvents();
+ p->adjustSize();
+ QCOMPARE(a->geometry(), QRectF(0, 0, 20, 20));
+ QCOMPARE(b->geometry(), QRectF(24, 0, 20, 20));
+ QCOMPARE(c->geometry(), QRectF(0, 21, 44, 20));
+
+ l->setVerticalSpacing(0);
+ QApplication::processEvents();
+ p->adjustSize();
+ QCOMPARE(a->geometry(), QRectF(0, 0, 20, 20));
+ QCOMPARE(b->geometry(), QRectF(24, 0, 20, 20));
+ QCOMPARE(c->geometry(), QRectF(0, 20, 44, 20));
+
}
QTEST_MAIN(tst_QGraphicsAnchorLayout)