void MyWidget::paintEvent(QPaintEvent*) { QPainter p(this); p.setRenderHint(QPainter::SmoothPixmapTransform); p.drawPixmap(rect(), &yourPixmap);}
#include <qwidget.h>class MyWidget : public QWidget {public: MyWidget(QWidget *parent = 0):QWidget(parent){} ~MyWidget(){}protected: void paintEvent(QPaintEvent*);};
QLabel *lbl = new QLabel(this);QPainter p(lbl);