blob: b281c8a596dee47ab04f7fae92cbb90c4af1329f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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()
|