From 9f47f2174215eb49f3060669db66c7145e2ee7e5 Mon Sep 17 00:00:00 2001 From: Bruno dos Santos de Araujo Date: Thu, 18 Feb 2010 11:36:11 -0400 Subject: Add unit test for QGraphicsItem.isBlockedByModalPanel() --- tests/qtgui/qgraphicsitem_isblocked_test.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tests/qtgui/qgraphicsitem_isblocked_test.py (limited to 'tests/qtgui') diff --git a/tests/qtgui/qgraphicsitem_isblocked_test.py b/tests/qtgui/qgraphicsitem_isblocked_test.py new file mode 100755 index 000000000..304a2be75 --- /dev/null +++ b/tests/qtgui/qgraphicsitem_isblocked_test.py @@ -0,0 +1,28 @@ +#!/usr/bin/python + +import unittest + +from PySide import QtGui, QtCore +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): + item = Item() + item.isBlockedByModalPanel() + +if __name__ == "__main__": + unittest.main() -- cgit v1.2.3