summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-14 15:11:18 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-14 15:21:32 -0300
commit83f8447c9546f53c134a10f02e81abdab88aed3a (patch)
tree60c3788a6c20059cfee591a1b17fcc76e9c25547 /tests
parentef35dc4cd4b6b09d41c855696b28a31708cf2ad7 (diff)
downloadpyside-83f8447c9546f53c134a10f02e81abdab88aed3a.tar.gz
pyside-83f8447c9546f53c134a10f02e81abdab88aed3a.tar.xz
pyside-83f8447c9546f53c134a10f02e81abdab88aed3a.zip
Fix bug#172 - "editing a QListWidgetItem stored in a variable makes it impossible to delete"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/qlistwidget_test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/QtGui/qlistwidget_test.py b/tests/QtGui/qlistwidget_test.py
index b473c61..16c919b 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()