修复邮件发送模块不支持Qt6的BUG
This commit is contained in:
@@ -328,7 +328,7 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
|
||||
widget->setStyleSheet(qss.join(""));
|
||||
|
||||
//可能会重复调用设置所以先要移除上一次的
|
||||
for (int i = 0; i < btnCount; i++) {
|
||||
for (int i = 0; i < btnCount; ++i) {
|
||||
for (int j = 0; j < this->btns.count(); j++) {
|
||||
if (this->btns.at(j) == btns.at(i)) {
|
||||
disconnect(btns.at(i), SIGNAL(toggled(bool)), this, SLOT(toggled(bool)));
|
||||
@@ -345,7 +345,7 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
|
||||
|
||||
//存储对应按钮对象,方便鼠标移上去的时候切换图片
|
||||
int checkedIndex = -1;
|
||||
for (int i = 0; i < btnCount; i++) {
|
||||
for (int i = 0; i < btnCount; ++i) {
|
||||
int icon = icons.at(i);
|
||||
QPixmap pixNormal = getPixmap1(styleColor.normalTextColor, icon, iconSize, iconWidth, iconHeight);
|
||||
QPixmap pixHover = getPixmap1(styleColor.hoverTextColor, icon, iconSize, iconWidth, iconHeight);
|
||||
|
||||
@@ -46,11 +46,7 @@ NavButton::NavButton(QWidget *parent) : QPushButton(parent)
|
||||
setText("导航按钮");
|
||||
}
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
|
||||
void NavButton::enterEvent(QEnterEvent *)
|
||||
#else
|
||||
void NavButton::enterEvent(QEvent *)
|
||||
#endif
|
||||
{
|
||||
hover = true;
|
||||
this->update();
|
||||
|
||||
@@ -92,11 +92,7 @@ public:
|
||||
explicit NavButton(QWidget *parent = 0);
|
||||
|
||||
protected:
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
|
||||
void enterEvent(QEnterEvent *);
|
||||
#else
|
||||
void enterEvent(QEvent *);
|
||||
#endif
|
||||
void leaveEvent(QEvent *);
|
||||
void paintEvent(QPaintEvent *);
|
||||
void drawBg(QPainter *painter);
|
||||
|
||||
Reference in New Issue
Block a user