tools/templates/pixlabel.h
author sheepluva
Sun, 28 Oct 2012 20:35:08 +0100
changeset 7860 a90936219ffa
parent 359 59fbfc65fbda
child 8442 535a00ca0d35
permissions -rw-r--r--
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);
};