Qwidget显示图片
QWidget显示图片
void paintEvent(QPaintEvent *event) { QPainter p;//创建画家对象 p.begin(this); QPixmap tempPixmap = QPixmap::fromImage(img1,Qt::AutoColor); int w1 = img1.width(); int h1 = img1.height(); p.drawPixmap(0, 0, w1, h1, tempPixmap); }
####################
QQ 3087438119