tools/templates/pixlabel.h
author Xeli
Mon, 28 May 2012 19:15:51 +0200
changeset 7140 29948153fda2
parent 359 59fbfc65fbda
child 8442 535a00ca0d35
permissions -rw-r--r--
Don't allow for multiple key up(or down) events, it will ignore the excess events

#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);
};