完成导航条,尚未Debug
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user