1
在PyQt标签上显示图像后,我想在显示的图像上绘制一个矩形。请注意,我并不是指用户在图像上“绘制”矩形的地方绘制的,而是指我只是想在图像上创建一个矩形。我有matplotlib轴的等效代码,但我不知道如何在PyQt中做同样的事情。PyQt - 如何覆盖图像上的矩形
# Create Figure/Axes Instance
figure,axes = matplotlib.pyplot.subplots()
axes.imshow(imageRGB)
# Draw Rectangle
axes.add_patch(matplotlib.patches.Rectangle((50,50),100,100,fill=False,edgecolor='red'))