完成导航条,尚未Debug

This commit is contained in:
Mike Solar
2023-07-30 01:06:42 +08:00
parent b9559e444b
commit 9fac130a24
31 changed files with 332 additions and 142 deletions

View File

@ -3,18 +3,19 @@
//
#define TEXT_SIZE 7
#include "MyButton.h"
MyButton::MyButton(QString logo,QString text,int width,int height,QList<MyButton *> *buttons,QWidget *parent) : QPushButton(parent) {
MyButton::MyButton(ButtonStruct &buttonStruct,int width,int height,QList<MyButton *> *buttons,QWidget *parent) : QPushButton(parent) {
this->buttons=buttons;
this->width2=width;
this->height2=height;
this->text=text;
this->logo=new QImage;
this->logo->load(logo);
this->text=buttonStruct.text;
this->logo=buttonStruct.image;
this->logo_cover = buttonStruct.image_cover;
this->setStyleSheet("background-color:#333332;/*border:none;*/");
}
MyButton::~MyButton() {
delete logo;
delete logo_cover;
}
void MyButton::paintEvent(QPaintEvent *e) {