summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam/viewfinder.h')
-rw-r--r--src/qcam/viewfinder.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h
index 33bdb146..ef5fd45b 100644
--- a/src/qcam/viewfinder.h
+++ b/src/qcam/viewfinder.h
@@ -7,13 +7,13 @@
#ifndef __QCAM_VIEWFINDER_H__
#define __QCAM_VIEWFINDER_H__
-#include <QLabel>
+#include <QWidget>
#include "format_converter.h"
class QImage;
-class ViewFinder : public QLabel
+class ViewFinder : public QWidget
{
public:
ViewFinder(QWidget *parent);
@@ -23,6 +23,10 @@ public:
unsigned int height);
void display(const unsigned char *rgb, size_t size);
+protected:
+ void paintEvent(QPaintEvent *) override;
+ QSize sizeHint() const override;
+
private:
unsigned int format_;
unsigned int width_;