Get "motion blur" in animations
-
Im using animation framework to move my items on scene. These my class for item
@class Pixmap : public QObject, public QGraphicsPixmapItem
{
Q_OBJECT
Q_PROPERTY(QPointF pos READ pos WRITE setPos)
public:
Pixmap(const QPixmap &pix,int num)
: QObject(), QGraphicsPixmapItem(pix),number(num)
{
setCacheMode(DeviceCoordinateCache);
}Pixmap() : QObject(), QGraphicsPixmapItem() { setCacheMode(DeviceCoordinateCache); } int number;
};@
Everything works fine, but without "motion blur" effect on moving. How can I get motion blur effect? Should I change animation mechanism? Or its better to create class that inherits QGraphicsEffect and set my custom effect on my items before animation starts(I dont have any ideas for this custom class)? -
For motion blur you need to blur the item in the vector which item moves. I hope you understood me.
If item moves in x coordinates then you need to do blur only on x axis.