diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-04-20 16:36:27 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:14 -0300 |
commit | 0f0124e54c22d46fa71722b9eff93ebb34816d4c (patch) | |
tree | 85ba3faab4e3bd4615aea4c586398b4308990f91 /tests | |
parent | d7684d00e3a61c4d457b04521756296dfe56d8a4 (diff) |
Fix bug 768 - "Method "QGraphicsItemGroup* QGraphicsScene::createItemGroup(const QList<QGraphicsItem*>& items)" missing"
Fix bug 769 - "Method "QGraphicsScene::destroyItemGroup(QGraphicsItemGroup* group)" missing"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtGui/qgraphicsscene_test.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/QtGui/qgraphicsscene_test.py b/tests/QtGui/qgraphicsscene_test.py index 98177e75a..85f5004c6 100644 --- a/tests/QtGui/qgraphicsscene_test.py +++ b/tests/QtGui/qgraphicsscene_test.py @@ -148,5 +148,21 @@ class ItemRetrieve(UsesQApplication): self.assertEqual(self.scene.itemAt(50, 150), self.bottomleft) self.assertEqual(self.scene.itemAt(150, 150), self.bottomright) +class TestGraphicsGroup(UsesQApplication): + def testIt(self): + scene = QGraphicsScene() + i1 = QGraphicsRectItem() + scene.addItem(i1) + i2 = QGraphicsRectItem(i1) + i3 = QGraphicsRectItem() + i4 = QGraphicsRectItem() + group = scene.createItemGroup((i2, i3, i4)) + scene.removeItem(i1) + del i1 # this shouldn't delete i2 + self.assertEqual(i2.scene(), scene) + scene.destroyItemGroup(group) + self.assertRaises(RuntimeError, group.type) + + if __name__ == '__main__': unittest.main() |