diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-10-19 16:59:36 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-10-20 15:47:16 -0200 |
commit | 5b51ad909f2b61449290c7cd984d4e580defd340 (patch) | |
tree | b5dc479d3c3aeec6315e2ae7065e580a99ae9940 /tests/QtCore/bug_1019.py | |
parent | 74ad07ffeea407d9e565607e9189ccedba3aceef (diff) | |
download | pyside-5b51ad909f2b61449290c7cd984d4e580defd340.tar.gz pyside-5b51ad909f2b61449290c7cd984d4e580defd340.tar.xz pyside-5b51ad909f2b61449290c7cd984d4e580defd340.zip |
Fix bug 1019 - "Overriding QWidget.show or QWidget.hide do not work"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtCore/bug_1019.py')
-rw-r--r-- | tests/QtCore/bug_1019.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/QtCore/bug_1019.py b/tests/QtCore/bug_1019.py new file mode 100644 index 0000000..b7f1f68 --- /dev/null +++ b/tests/QtCore/bug_1019.py @@ -0,0 +1,32 @@ +import unittest +from PySide.QtCore import * + +class MyTimer (QTimer): + def __init__(self): + QTimer.__init__(self) + self.startCalled = False + + @Slot() + def slotUsedToIncreaseMethodOffset(self): + pass + +class MyTimer2 (MyTimer): + + @Slot() + def slotUsedToIncreaseMethodOffset2(self): + pass + + def start(self): + self.startCalled = True + QCoreApplication.instance().quit() + +class TestBug1019 (unittest.TestCase): + def testIt(self): + app = QCoreApplication([]) + t = MyTimer2() + QTimer.singleShot(0, t.start) + app.exec_() + self.assertTrue(t.startCalled) + +if __name__ == "__main__": + unittest.main() |