Drawing Introduction
Previously, we saw that PyQt5 already has very powerful widget capabilities. However, the widget interfaces are relatively fixed. If we want to DIY and draw some custom graphics, such as points, lines, rectangles, circles, characters, images, etc., we can use the QPainter class drawing functionality.
Drawing Shapes
2 items
Drawing Text
2 items
Drawing Images
The function for drawing images is similar to drawing shapes earlier - only one function is needed: