tools/templates/pixlabel.h
author sheepluva
Thu, 15 Sep 2011 03:17:23 +0200
changeset 5910 c9a4de51b5a0
parent 359 59fbfc65fbda
child 8442 535a00ca0d35
permissions -rw-r--r--
cleaned up the screenshot procedure a little. This does NOT fix the segfaults or invalid pointer operations that occur in there for me if I resize the window and then screenshot (does not always happen. usually in FreeMem() after the successful save though!

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