I want to draw patterns (preferable as QPixmap) along a QGraphicsPathItem inside my QGraphicsView. This should work similar to filling a QBrush with a texture by using QBrush.setTexture("example.png")
. Is there a way to do this on a QPen? I couldn't find anything related to this in the PyQt documentation.
The texture should be placed similar to this example picture
It doesn't matter if the texture keeps it's own width or is scaled to QPen's width.
Is there some form of workaround to implement this? I was thinking about using QTransform in a way to transform QPixmap to the shape of the desired QGraphicsPathItem.