#defineQRWIDGET_H
#include
#include"qrencode.h"
classQRWidget:publicQWidget
{
Q_OBJECT
public:
explicitQRWidget(QWidget*parent=0);
~QRWidget();
voidsetString(QStringstr);
intgetQRWidth()const;
boolsaveImage(QStringname,intsize);
private:
voiddraw(QPainter&painter,intwidth,intheight);
QStringstring;
QRcode*qr;
signals:
protected:
voidpaintEvent(QPaintEvent*);
QSizesizeHint()const;
QSizeminimumSizeHint()const;
publicslots:
};
#endif//QRWIDGET_H