Flashing the thumbnail in a sequence

For this last animation, we want to display a blue flash on each filter preview when the thumbnail is updated. We do not want to flash all previews at the same time, but in a sequence, one by one. This feature will be achieved in two parts:

  • Create a color animation in FilterWidget to display a blue flash
  • Build a sequential animation group in MainWindow containing all FilterWidget color animations

Let's start to add the color animation. Update FilterWidget.h as shown in the following snippet:

#include <QGraphicsColorizeEffect> class FilterWidget : public QWidget { Q_OBJECT public: explicit FilterWidget(Filter& filter, QWidget *parent = 0); ~FilterWidget(); ... QPropertyAnimation* colorAnimation(); private: ...

Get Mastering Qt 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.