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.
40 lines
979 B
40 lines
979 B
#include "search.h"
|
|
#include "ui_search.h"
|
|
#include "home.h"
|
|
search::search(QWidget *parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::search)
|
|
{
|
|
ui->setupUi(this);
|
|
ui->search_button->setStyleSheet("QPushButton{border-radius:5px;background:rgb(255,131,7);color:black;}");
|
|
}
|
|
|
|
search::~search()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void search::on_search_to_home_clicked()
|
|
{
|
|
Home* search_to_home = new Home;
|
|
search_to_home->set_background();
|
|
search_to_home->show();
|
|
delete this;
|
|
}
|
|
|
|
void search::search_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/带图案的背景.png").scaled(this->size());
|
|
palette.setBrush(QPalette::Window, QBrush(pixmap));
|
|
this->setPalette(palette);
|
|
|
|
}
|