改进结构

master
feiyangqingyun 2021-05-20 21:12:00 +08:00
parent b67a3132f4
commit 392697b3b9
17 changed files with 44 additions and 14 deletions

View File

@ -25,7 +25,7 @@ SUBDIRS += battery #电池电量控件
SUBDIRS += lineeditnext #文本框回车焦点下移
SUBDIRS += zhtopy #汉字转拼音
SUBDIRS += qwtdemo #qwt的源码版本无需插件直接源码集成到你的项目即可
SUBDIRS += buttondefence #通用按钮地图效果
SUBDIRS += devicebutton #设备按钮地图效果
SUBDIRS += mouseline #鼠标定位十字线
SUBDIRS += emailtool #邮件发送工具
SUBDIRS += ntpclient #NTP服务器时间同步

View File

@ -22,3 +22,11 @@ SOURCES += \
$$PWD/quistyle.cpp \
$$PWD/quitipbox.cpp \
$$PWD/quiwidget.cpp
!contains(DEFINES, no_qui_qm) {
RESOURCES += $$PWD/source/qm.qrc
}
!contains(DEFINES, no_qui_ttf) {
RESOURCES += $$PWD/source/ttf.qrc
}

View File

@ -14,6 +14,7 @@ public:
static QChar IconNormal; //还原图标
static QChar IconClose; //关闭图标
//全局字体
static QString FontName; //全局字体名称
static int FontSize; //全局字体大小

View File

@ -1076,7 +1076,11 @@ void QUIHelper::showMessageBoxInfo(const QString &info, int closeSec, bool exec)
QUIMessageBox::Instance()->show();
}
} else {
QMessageBox::information(0, "提示", info, QMessageBox::Ok);
QMessageBox box(QMessageBox::Information, "提示", info);
box.setStandardButtons(QMessageBox::Yes);
box.setButtonText(QMessageBox::Yes, QString("确 定"));
box.exec();
//QMessageBox::information(0, "提示", info, QMessageBox::Yes);
}
}
@ -1092,7 +1096,11 @@ void QUIHelper::showMessageBoxError(const QString &info, int closeSec, bool exec
QUIMessageBox::Instance()->show();
}
} else {
QMessageBox::critical(0, "错误", info, QMessageBox::Ok);
QMessageBox box(QMessageBox::Critical, "错误", info);
box.setStandardButtons(QMessageBox::Yes);
box.setButtonText(QMessageBox::Yes, QString("确 定"));
box.exec();
//QMessageBox::critical(0, "错误", info, QMessageBox::Yes);
}
}
@ -1103,7 +1111,12 @@ int QUIHelper::showMessageBoxQuestion(const QString &info)
msg.setMessage(info, 1);
return msg.exec();
} else {
return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No);
QMessageBox box(QMessageBox::Question, "询问", info);
box.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
box.setButtonText(QMessageBox::Yes, QString("确 定"));
box.setButtonText(QMessageBox::No, QString("取 消"));
return box.exec();
//return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No);
}
}

Binary file not shown.

Binary file not shown.

6
core_qui/source/qm.qrc Normal file
View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>image/qt_zh_CN.qm</file>
<file>image/widgets.qm</file>
</qresource>
</RCC>

6
core_qui/source/ttf.qrc Normal file
View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>image/fontawesome-webfont.ttf</file>
<file>image/iconfont.ttf</file>
</qresource>
</RCC>

View File

@ -1,7 +1,5 @@
<RCC>
<qresource prefix="/">
<file>main.ico</file>
<file>qt_zh_CN.qm</file>
<file>widgets.qm</file>
</qresource>
</RCC>

View File

@ -1,7 +1,5 @@
<RCC>
<qresource prefix="/">
<file>main.ico</file>
<file>qt_zh_CN.qm</file>
<file>widgets.qm</file>
</qresource>
</RCC>

Binary file not shown.

Binary file not shown.