aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_750.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/bug_750.py')
-rw-r--r--tests/QtGui/bug_750.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtGui/bug_750.py b/tests/QtGui/bug_750.py
new file mode 100644
index 000000000..9b66df9ed
--- /dev/null
+++ b/tests/QtGui/bug_750.py
@@ -0,0 +1,24 @@
+import unittest
+
+from helper import UsesQApplication
+
+from PySide.QtGui import QPainter, QFont, QFontInfo, QWidget, qApp
+
+class MyWidget(QWidget):
+ def paintEvent(self, e):
+ p = QPainter(self)
+ self._info = p.fontInfo()
+ self._app.quit()
+
+
+class TestQPainter(UsesQApplication):
+ def testFontInfo(self):
+ w = MyWidget()
+ w._app = self.app
+ w._info = None
+ w.show()
+ self.app.exec_()
+ self.assert_(w._info)
+
+if __name__ == '__main__':
+ unittest.main()