Add unit test for QGraphicsItem.isBlockedByModalPanel()
This commit is contained in:
parent
ecb715ae00
commit
9f47f21742
1 changed files with 28 additions and 0 deletions
28
tests/qtgui/qgraphicsitem_isblocked_test.py
Executable file
28
tests/qtgui/qgraphicsitem_isblocked_test.py
Executable file
|
|
@ -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()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue