阶段备份

This commit is contained in:
2024-08-14 10:38:48 +08:00
parent bc2bcd07ca
commit 6366bde000
531 changed files with 39 additions and 42 deletions
@@ -1,37 +0,0 @@
#include <QApplication>
#include <QPushButton>
#include <QPropertyAnimation>
#include <QMouseEvent>
#include <globalStruct.h>
#include <qpainter.h>
class toolBarButton : public QPushButton {
public:
QIcon defaultIcon;
toolBarButton(int Width, int Height, QIcon defaultIn,QString tips="")
{
defaultIcon = defaultIn;
this->setToolTip(tips);
this->setIcon(defaultIcon); // 设置图标
this->setFixedHeight(Height);
this->setFixedWidth(Width);
toDefault();
}
void toDefault()
{
this->setStyleSheet(QString("QPushButton { background-color: transparent;"
"border: 0px solid red;" // 显式设置边框
"border-radius: 0px;" // 设置边框半径为0,确保没有圆角
"}"
"QPushButton:hover { background-color: rgb(%1); }").arg(sColor_BlackWithWhite));
}
void pressed()
{
this->setStyleSheet(QString("QPushButton { background-color:rgb(%1) ;"
"border: 0px solid red;" // 显式设置边框
"border-radius: 0px;" // 设置边框半径为0,确保没有圆角
"}"
"QPushButton:hover { background-color: rgb(%2); }").arg(sColor_GoldWithBlack).arg(sColor_Gold)); // 设置透明背景和悬停时的背景色
}
};
#pragma once