diff options
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_919.py | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 68aff6476..f1b9adef2 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -66,6 +66,7 @@ PYSIDE_TEST(bug_862.py) PYSIDE_TEST(bug_871.py) PYSIDE_TEST(bug_879.py) PYSIDE_TEST(bug_882.py) +PYSIDE_TEST(bug_919.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) PYSIDE_TEST(event_filter_test.py) diff --git a/tests/QtGui/bug_919.py b/tests/QtGui/bug_919.py new file mode 100644 index 000000000..dd883ce43 --- /dev/null +++ b/tests/QtGui/bug_919.py @@ -0,0 +1,27 @@ +import unittest + +from helper import TimedQApplication +from PySide.QtGui import QPainter, QPushButton, QStyleOptionButton, QApplication, QStyle + +class MyWidget(QPushButton): + def __init__(self, parent = None): + QPushButton.__init__(self, parent) + self._painted = False + + def paintEvent(self, e): + p = QPainter(self) + style = QApplication.style() + option = QStyleOptionButton() + style.drawControl(QStyle.CE_PushButton, option, p) + self._painted = True + + +class TestBug919(TimedQApplication): + def testFontInfo(self): + w = MyWidget() + w.show() + self.app.exec_() + self.assert_(w._painted) + +if __name__ == '__main__': + unittest.main() |