aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qgraphicsitem_isblocked_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/qgraphicsitem_isblocked_test.py')
-rwxr-xr-xtests/QtGui/qgraphicsitem_isblocked_test.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/QtGui/qgraphicsitem_isblocked_test.py b/tests/QtGui/qgraphicsitem_isblocked_test.py
new file mode 100755
index 000000000..b281c8a59
--- /dev/null
+++ b/tests/QtGui/qgraphicsitem_isblocked_test.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+import unittest
+
+from PySide import QtCore
+from PySide import QtGui
+from helper import UsesQApplication
+
+class Item(QtGui.QGraphicsItem):
+
+ def __init__(self):
+ QtGui.QGraphicsItem.__init__(self)
+
+ def boundingRect(self):
+ return QtCore.QRectF(0, 0, 100, 100)
+
+ def paint(self, painter, option, widget):
+ painter.setBrush(QtGui.QColor(255, 255, 255))
+ painter.drawRect(0, 0, 100, 100)
+
+
+class QGraphicsViewIsBlockedTest(UsesQApplication):
+
+ def testIsBlockedByModalPanel(self):
+ (first, second) = Item().isBlockedByModalPanel()
+ self.assertFalse(first)
+
+if __name__ == "__main__":
+ unittest.main()