You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Idea/src/puppet_cat_content.cpp

38 lines
921 B

#include "puppet_cat_content.h"
#include "ui_puppet_cat_content.h"
#include "puppet_cat.h"
Puppet_cat_content::Puppet_cat_content(QWidget *parent) :
QWidget(parent),
ui(new Ui::Puppet_cat_content)
{
ui->setupUi(this);
}
Puppet_cat_content::~Puppet_cat_content()
{
delete ui;
}
void Puppet_cat_content::on_back_clicked()
{
Puppet_cat *back = new Puppet_cat;
back->puppet_cat_set_background();
back->show();
delete this;
}
void Puppet_cat_content::set_background()
{
this->setWindowTitle("阅览界面-布偶猫");
// ui->label->setStyleSheet("background-color:red");//背景色
this->setMinimumSize(1280,720);
this->setMaximumSize(1280,720);
this->setAutoFillBackground(true);
QPalette palette;
QPixmap pixmap = QPixmap(":/image/背景_book.png").scaled(this->size());
palette.setBrush(QPalette::Window, QBrush(pixmap));
this->setPalette(palette);
}