Как изменить размеры сеточки
import sys
from PyQt4 import QtGui
from PyQt4 import QtCore
class Paintar(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.resize(300, 300)
def paintEvent(self, event):
painter = QtGui.QPainter(self)
if not painter.isActive():
painter.begin(self)
painter.fillRect(self.rect(),
QtGui.QBrush(QtGui.QColor('white')))
painter.fillRect(self.rect(),
QtGui.QBrush(QtGui.QColor('#09f'),
QtCore.Qt.CrossPattern))
painter.end()
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
lol = Paintar()
lol.show()
app.exec_()