1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/src/misc/qrwidget.h

27 lines
495 B
C
Raw Normal View History

2015-03-07 20:40:45 +08:00
#ifndef QRWIDGET_H
#define QRWIDGET_H
// https://stackoverflow.com/questions/21400254/how-to-draw-a-qr-code-with-qt-in-native-c-c
#include <QWidget>
class QRWidget : public QWidget
{
Q_OBJECT
public:
explicit QRWidget(QWidget *parent = 0);
void setQRData(QString data);
QString getImageAsText();
QImage* getImage();
bool saveImage(QString path);
2015-03-07 20:40:45 +08:00
private:
QString data;
void paintImage();
QImage *image;
QSize size;
};
#endif // QRWIDGET_H