From 83f8447c9546f53c134a10f02e81abdab88aed3a Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 14 Oct 2010 15:11:18 -0300 Subject: Fix bug#172 - "editing a QListWidgetItem stored in a variable makes it impossible to delete" Reviewer: Luciano Wolf Marcelo Lira --- tests/QtGui/qlistwidget_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/QtGui/qlistwidget_test.py b/tests/QtGui/qlistwidget_test.py index b473c61a4..16c919bdc 100644 --- a/tests/QtGui/qlistwidget_test.py +++ b/tests/QtGui/qlistwidget_test.py @@ -41,6 +41,15 @@ class QListWidgetTest(UsesQApplication): self.assert_(sys.getrefcount(i), 2) del i + def testIt(self): + lst = QtGui.QListWidget() + lst.show() + slot = lambda : lst.removeItemWidget(lst.currentItem()) + lst.addItem(QtGui.QListWidgetItem("foo")) + QtCore.QTimer.singleShot(0, slot) + QtCore.QTimer.singleShot(0, lst.close) + self.app.exec_() + self.assertEqual(lst.count(), 1) if __name__ == '__main__': unittest.main() -- cgit v1.2.3