let animation objects delete themselves after they are not being used anymore
PS:
I don't like that we create new animation objects every single time before a page transition is done, I'm sure that can be done in a nicer way.
But at least we're not keeping those non-reused objects around forever now...
#include <QLabel>
#include <QRect>
#include <QList>
#include <QMouseEvent>
class PixLabel : public QLabel
{
Q_OBJECT
public:
PixLabel();
QList<QRect> rects;
public slots:
void AddRect();
private:
void paintEvent(QPaintEvent * event);
void mousePressEvent(QMouseEvent * e);
};