Custom qrcode renderer to allow smooth resizing
This commit is contained in:
23
src/qrcodelabel.h
Normal file
23
src/qrcodelabel.h
Normal 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
|
||||
Reference in New Issue
Block a user