diff options
author | Carolina Gomes <ext-carolina.s.gomes@nomovok.com> | 2010-08-11 09:11:41 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-08-11 09:11:41 (GMT) |
commit | ae1a4a918137e99417e70a4f2c2c43f14406f993 (patch) | |
tree | e616e7180b3c087586a8015f09b74c51ecf3b714 /tests/auto/qgraphicsgridlayout | |
parent | 9a6bd194d403f596d66fbe8aad43550310f48eca (diff) | |
download | Qt-ae1a4a918137e99417e70a4f2c2c43f14406f993.zip Qt-ae1a4a918137e99417e70a4f2c2c43f14406f993.tar.gz Qt-ae1a4a918137e99417e70a4f2c2c43f14406f993.tar.bz2 |
Patch to QTBUG-3078
Merge-request: 723
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'tests/auto/qgraphicsgridlayout')
-rw-r--r-- | tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index d1d6860..123dd89 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -78,6 +78,7 @@ private slots: void horizontalSpacing(); void itemAt(); void removeAt(); + void removeLayoutItems(); void rowAlignment(); void rowCount(); void rowMaximumHeight(); @@ -992,6 +993,23 @@ void tst_QGraphicsGridLayout::removeAt() delete widget; } +void tst_QGraphicsGridLayout::removeLayoutItems() +{ + QGraphicsScene scene; + QGraphicsView view(&scene); + + QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); + scene.addItem(widget); + QGraphicsGridLayout *l = new QGraphicsGridLayout(); + widget->setLayout(l); + + populateLayout(l, 3, 2); + QCOMPARE(l->count(), 6); + l->removeItem(l->itemAt(5)); + l->removeItem(l->itemAt(4)); + QCOMPARE(l->count(), 4); +} + // public Qt::Alignment rowAlignment(int row) const void tst_QGraphicsGridLayout::rowAlignment() { |