How to create a basic custom QGraphicsEffect in Qt?
问题 I have been trying to create a basic QGraphicsEffect to change the colors of the widget, but first I tried to make an effect that does nothing like so: class QGraphicsSepiaEffect(QtWidgets.QGraphicsEffect): def draw(painter): pixmap = sourcePixmap() painter.drawPixmap(pixmap.rect(), pixmap) I am using PySide2. Though I checked all over the internet but couldn't find any sample, neither a template nor a real custom effect. How can I write a basic effect to alter the colors of my widget? 回答1: