#ifndef QRWIDGET_H #define QRWIDGET_H #include class QRWidget : public QWidget { Q_OBJECT public: explicit QRWidget(QWidget *parent = nullptr); void setQRData(const QString &data); private: QString _data; protected: void paintEvent(QPaintEvent *); }; #endif