几乎完成
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Created by HW on 2023/07/26.
|
||||
//
|
||||
#include "MyButton.h"
|
||||
@ -10,6 +10,7 @@ MyButton::MyButton(ButtonStruct &buttonStruct,int width,int height,QList<MyButto
|
||||
this->height2=height;
|
||||
this->text=buttonStruct.text;
|
||||
this->op = buttonStruct.op;
|
||||
this->orig_name = buttonStruct.orig_name;
|
||||
this->func = buttonStruct.func;
|
||||
this->url = buttonStruct.url;
|
||||
this->path = buttonStruct.path;
|
||||
@ -43,7 +44,7 @@ void MyButton::paintEvent(QPaintEvent *e) {
|
||||
setContentsMargins(0,0,0,0);
|
||||
QFont ft;
|
||||
ft.setPixelSize(TEXT_SIZE);
|
||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊɶ<EFBFBD><EFBFBD>3<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD>֪<EFBFBD><EFBFBD>
|
||||
//别问我为啥乘3,我也不知道
|
||||
int text_x=(width()-TEXT_SIZE*text.length()*scale*3)/2;
|
||||
int text_y=(logo_width+logo_y+10);
|
||||
QRectF logo_rect(logo_x, logo_y, logo_width, logo_width);
|
||||
@ -91,6 +92,6 @@ void MyButton::mouseReleaseEvent(QMouseEvent *event) {
|
||||
checked=false;
|
||||
else
|
||||
checked=true;
|
||||
emit clicked1(op, func, url, path, initial_position);
|
||||
emit clicked1(orig_name,op, func, url, path, initial_position);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user