修复邮件发送模块不支持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);
|
||||
|
||||
@@ -495,7 +495,7 @@ margin:0px;
|
||||
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252);
|
||||
}
|
||||
|
||||
QTabBar::tab:selected,QTabBar::tab:hover{
|
||||
QTabBar::tab:selected{
|
||||
border-style:solid;
|
||||
border-color:#AAAAAA;
|
||||
background:#444444;
|
||||
@@ -509,38 +509,38 @@ QTabBar::tab:left,QTabBar::tab:right{
|
||||
padding:8px 3px 8px 3px;
|
||||
}
|
||||
|
||||
QTabBar::tab:top:selected,QTabBar::tab:top:hover{
|
||||
QTabBar::tab:top:selected{
|
||||
border-width:2px 0px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:right:selected,QTabBar::tab:right:hover{
|
||||
QTabBar::tab:right:selected{
|
||||
border-width:0px 0px 0px 2px;
|
||||
}
|
||||
|
||||
QTabBar::tab:bottom:selected,QTabBar::tab:bottom:hover{
|
||||
QTabBar::tab:bottom:selected{
|
||||
border-width:0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:left:selected,QTabBar::tab:left:hover{
|
||||
QTabBar::tab:left:selected{
|
||||
border-width:0px 2px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:top:hover,QTabBar::tab:first:bottom:selected,QTabBar::tab:first:bottom:hover{
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:bottom:selected{
|
||||
border-left-width:1px;
|
||||
border-left-color:#242424;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:left:hover,QTabBar::tab:first:right:selected,QTabBar::tab:first:right:hover{
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:right:selected{
|
||||
border-top-width:1px;
|
||||
border-top-color:#242424;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:top:hover,QTabBar::tab:last:bottom:selected,QTabBar::tab:last:bottom:hover{
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:bottom:selected{
|
||||
border-right-width:1px;
|
||||
border-right-color:#242424;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:left:hover,QTabBar::tab:last:right:selected,QTabBar::tab:last:right:hover{
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:right:selected{
|
||||
border-bottom-width:1px;
|
||||
border-bottom-color:#242424;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -28,7 +28,7 @@ void frmMain::initForm()
|
||||
|
||||
//加载鼠标右键菜单翻译文件
|
||||
QTranslator *translator1 = new QTranslator(qApp);
|
||||
if (translator1->load(":/qm/qt_zh_CN.qm")){
|
||||
if (translator1->load(":/qm/qt_zh_CN.qm")) {
|
||||
qApp->installTranslator(translator1);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ void frmMain::initForm()
|
||||
void frmMain::loadStyle(const QString &qssFile)
|
||||
{
|
||||
//加载样式表
|
||||
QString qss;
|
||||
QString qss;
|
||||
QFile file(qssFile);
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
//用QTextStream读取样式文件不用区分文件编码 带bom也行
|
||||
@@ -79,3 +79,10 @@ void frmMain::on_btnStyle3_clicked()
|
||||
{
|
||||
loadStyle(":/qss/blacksoft.css");
|
||||
}
|
||||
|
||||
void frmMain::on_btnInfo_clicked()
|
||||
{
|
||||
//QFileDialog::getOpenFileName(this, "", "", "", 0, QFileDialog::DontUseNativeDialog);
|
||||
//QFileDialog::getExistingDirectory(0, "", "", QFileDialog::DontUseNativeDialog);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ private slots:
|
||||
void on_btnStyle1_clicked();
|
||||
void on_btnStyle2_clicked();
|
||||
void on_btnStyle3_clicked();
|
||||
void on_btnInfo_clicked();
|
||||
};
|
||||
|
||||
#endif // FRMMAIN_H
|
||||
|
||||
@@ -495,7 +495,7 @@ margin:0px;
|
||||
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252);
|
||||
}
|
||||
|
||||
QTabBar::tab:selected,QTabBar::tab:hover{
|
||||
QTabBar::tab:selected{
|
||||
border-style:solid;
|
||||
border-color:#AAAAAA;
|
||||
background:#444444;
|
||||
@@ -509,38 +509,38 @@ QTabBar::tab:left,QTabBar::tab:right{
|
||||
padding:8px 3px 8px 3px;
|
||||
}
|
||||
|
||||
QTabBar::tab:top:selected,QTabBar::tab:top:hover{
|
||||
QTabBar::tab:top:selected{
|
||||
border-width:2px 0px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:right:selected,QTabBar::tab:right:hover{
|
||||
QTabBar::tab:right:selected{
|
||||
border-width:0px 0px 0px 2px;
|
||||
}
|
||||
|
||||
QTabBar::tab:bottom:selected,QTabBar::tab:bottom:hover{
|
||||
QTabBar::tab:bottom:selected{
|
||||
border-width:0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:left:selected,QTabBar::tab:left:hover{
|
||||
QTabBar::tab:left:selected{
|
||||
border-width:0px 2px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:top:hover,QTabBar::tab:first:bottom:selected,QTabBar::tab:first:bottom:hover{
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:bottom:selected{
|
||||
border-left-width:1px;
|
||||
border-left-color:#242424;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:left:hover,QTabBar::tab:first:right:selected,QTabBar::tab:first:right:hover{
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:right:selected{
|
||||
border-top-width:1px;
|
||||
border-top-color:#242424;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:top:hover,QTabBar::tab:last:bottom:selected,QTabBar::tab:last:bottom:hover{
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:bottom:selected{
|
||||
border-right-width:1px;
|
||||
border-right-color:#242424;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:left:hover,QTabBar::tab:last:right:selected,QTabBar::tab:last:right:hover{
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:right:selected{
|
||||
border-bottom-width:1px;
|
||||
border-bottom-color:#242424;
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ margin:0px;
|
||||
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #F6F6F6,stop:1 #F6F6F6);
|
||||
}
|
||||
|
||||
QTabBar::tab:selected,QTabBar::tab:hover{
|
||||
QTabBar::tab:selected{
|
||||
border-style:solid;
|
||||
border-color:#575959;
|
||||
background:#FFFFFF;
|
||||
@@ -509,38 +509,38 @@ QTabBar::tab:left,QTabBar::tab:right{
|
||||
padding:8px 3px 8px 3px;
|
||||
}
|
||||
|
||||
QTabBar::tab:top:selected,QTabBar::tab:top:hover{
|
||||
QTabBar::tab:top:selected{
|
||||
border-width:2px 0px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:right:selected,QTabBar::tab:right:hover{
|
||||
QTabBar::tab:right:selected{
|
||||
border-width:0px 0px 0px 2px;
|
||||
}
|
||||
|
||||
QTabBar::tab:bottom:selected,QTabBar::tab:bottom:hover{
|
||||
QTabBar::tab:bottom:selected{
|
||||
border-width:0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:left:selected,QTabBar::tab:left:hover{
|
||||
QTabBar::tab:left:selected{
|
||||
border-width:0px 2px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:top:hover,QTabBar::tab:first:bottom:selected,QTabBar::tab:first:bottom:hover{
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:bottom:selected{
|
||||
border-left-width:1px;
|
||||
border-left-color:#B6B6B6;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:left:hover,QTabBar::tab:first:right:selected,QTabBar::tab:first:right:hover{
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:right:selected{
|
||||
border-top-width:1px;
|
||||
border-top-color:#B6B6B6;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:top:hover,QTabBar::tab:last:bottom:selected,QTabBar::tab:last:bottom:hover{
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:bottom:selected{
|
||||
border-right-width:1px;
|
||||
border-right-color:#B6B6B6;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:left:hover,QTabBar::tab:last:right:selected,QTabBar::tab:last:right:hover{
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:right:selected{
|
||||
border-bottom-width:1px;
|
||||
border-bottom-color:#B6B6B6;
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ margin:0px;
|
||||
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #F2F9FF,stop:1 #DAEFFF);
|
||||
}
|
||||
|
||||
QTabBar::tab:selected,QTabBar::tab:hover{
|
||||
QTabBar::tab:selected{
|
||||
border-style:solid;
|
||||
border-color:#386488;
|
||||
background:#EAF7FF;
|
||||
@@ -509,38 +509,38 @@ QTabBar::tab:left,QTabBar::tab:right{
|
||||
padding:8px 3px 8px 3px;
|
||||
}
|
||||
|
||||
QTabBar::tab:top:selected,QTabBar::tab:top:hover{
|
||||
QTabBar::tab:top:selected{
|
||||
border-width:2px 0px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:right:selected,QTabBar::tab:right:hover{
|
||||
QTabBar::tab:right:selected{
|
||||
border-width:0px 0px 0px 2px;
|
||||
}
|
||||
|
||||
QTabBar::tab:bottom:selected,QTabBar::tab:bottom:hover{
|
||||
QTabBar::tab:bottom:selected{
|
||||
border-width:0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:left:selected,QTabBar::tab:left:hover{
|
||||
QTabBar::tab:left:selected{
|
||||
border-width:0px 2px 0px 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:top:hover,QTabBar::tab:first:bottom:selected,QTabBar::tab:first:bottom:hover{
|
||||
QTabBar::tab:first:top:selected,QTabBar::tab:first:bottom:selected{
|
||||
border-left-width:1px;
|
||||
border-left-color:#C0DCF2;
|
||||
}
|
||||
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:left:hover,QTabBar::tab:first:right:selected,QTabBar::tab:first:right:hover{
|
||||
QTabBar::tab:first:left:selected,QTabBar::tab:first:right:selected{
|
||||
border-top-width:1px;
|
||||
border-top-color:#C0DCF2;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:top:hover,QTabBar::tab:last:bottom:selected,QTabBar::tab:last:bottom:hover{
|
||||
QTabBar::tab:last:top:selected,QTabBar::tab:last:bottom:selected{
|
||||
border-right-width:1px;
|
||||
border-right-color:#C0DCF2;
|
||||
}
|
||||
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:left:hover,QTabBar::tab:last:right:selected,QTabBar::tab:last:right:hover{
|
||||
QTabBar::tab:last:left:selected,QTabBar::tab:last:right:selected{
|
||||
border-bottom-width:1px;
|
||||
border-bottom-color:#C0DCF2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user