0

I tried the following code which gives me an orange crosspattern on white background and I would like it to be blue for example.

brush = QtGui.QBrush()
brush.setColor(QtGui.QColor('orange'))
brush.setStyle(QtCore.Qt.CrossPattern)

scene = QtWidgets.QGraphicsScene()
view = QtWidgets.QGraphicsView(scene)

it = scene.addRect(QtCore.QRectF(0, 0, 400, 400))
it.setBrush(brush)

view.resize(640, 480)
view.show()
Laeti
  • 1
  • 1

0 Answers0