代码:
#include "mywidget.h"
#include "ui_mywidget.h"
MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::MyWidget)
{
ui->setupUi(this);
ui->background->setPixmap(QPixmap(":/qt picture/logo.png"));
// ui->background->setMovie(QMovie(":/qt picture/qq2.gif"));
ui->background->setScaledContents(true);
}
MyWidget::~MyWidget()
{
delete ui;
}