Custom qrcode renderer to allow smooth resizing

This commit is contained in:
Aditya Kulkarni
2018-10-30 16:04:26 -07:00
parent 489bb4ae5f
commit 75e755707c
5 changed files with 96 additions and 39 deletions

23
src/qrcodelabel.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef QRCODELABEL_H
#define QRCODELABEL_H
#include "precompiled.h"
class QRCodeLabel : public QLabel
{
Q_OBJECT
public:
explicit QRCodeLabel(QWidget *parent = 0);
virtual QSize sizeHint() const;
void setAddress(QString address);
QPixmap scaledPixmap() const;
public slots:
void resizeEvent(QResizeEvent *);
private:
QString address;
};
#endif // QRCODELABEL_H