#include <zmessagebox.h>
RES_ICON_Reader ir;
没有按钮的(定时消失)对话框:
int ret= ZMessageBox::timerMessage(this,ir.getIcon(图标),toUnicode("我是提示信息"),秒数);
一个按钮的对话框:
int ret=ZMessageBox::information(this,ir.getIcon(图标),toUnicode("我是提示信息"),toUnicode("按钮信息"));
int ret=ZMessageBox::timerInformation(this,ir.getIcon(图标),toUnicode("我是提示信息"),秒数,toUnicode("按钮信息"));
两个按钮的对话框:
int ret=ZMessageBox::information(this,ir.getIcon(图标),toUnicode("我是提示信息"),toUnicode("左按钮"),toUnicode("右按钮"));
int ret=ZMessageBox::timerInformation(this,ir.getIcon(图标),toUnicode("我是提示信息"),秒数,toUnicode("左按钮"),toUnicode("右按钮"));
三个按钮的对话框:
int ret=ZMessageBox::information(this,ir.getIcon(图标),toUnicode("我是提示信息"), toUnicode("左按钮"),toUnicode("中按钮"),toUnicode("右按钮"));
int ret=ZMessageBox::timerInformation(this,ir.getIcon(图标),toUnicode("我是提示信息 "),秒数,toUnicode("左按钮"),toUnicode("中按钮"),toUnicode("右按钮"));
图标说明:
RES_ICON_DLG_EMPTY_TRASH 空的垃圾桶
RES_ICON_DLG_EXCLAMATORY_MARK 红色的叹号
RES_ICON_DLG_WAITING 沙漏
RES_ICON_DLG_ERROR 红叉
RES_ICON_DLG_COMPLETE 对勾
返回值:
0 第一个按钮(超时也返回这个)
1 第二个按钮
2 第三个按钮
显示汉字:
QString toUnicode(const char *str){
return QString::fromLocal8Bit(str, strlen(str));
}
然后启动程序的.desktop文件修改 Exec=程序名 -qws -font SSong
RES_ICON_Reader ir;
没有按钮的(定时消失)对话框:
int ret= ZMessageBox::timerMessage(this,ir.getIcon(图标),toUnicode("我是提示信息"),秒数);
一个按钮的对话框:
int ret=ZMessageBox::information(this,ir.getIcon(图标),toUnicode("我是提示信息"),toUnicode("按钮信息"));
int ret=ZMessageBox::timerInformation(this,ir.getIcon(图标),toUnicode("我是提示信息"),秒数,toUnicode("按钮信息"));
两个按钮的对话框:
int ret=ZMessageBox::information(this,ir.getIcon(图标),toUnicode("我是提示信息"),toUnicode("左按钮"),toUnicode("右按钮"));
int ret=ZMessageBox::timerInformation(this,ir.getIcon(图标),toUnicode("我是提示信息"),秒数,toUnicode("左按钮"),toUnicode("右按钮"));
三个按钮的对话框:
int ret=ZMessageBox::information(this,ir.getIcon(图标),toUnicode("我是提示信息"), toUnicode("左按钮"),toUnicode("中按钮"),toUnicode("右按钮"));
int ret=ZMessageBox::timerInformation(this,ir.getIcon(图标),toUnicode("我是提示信息 "),秒数,toUnicode("左按钮"),toUnicode("中按钮"),toUnicode("右按钮"));
图标说明:
RES_ICON_DLG_EMPTY_TRASH 空的垃圾桶
RES_ICON_DLG_EXCLAMATORY_MARK 红色的叹号
RES_ICON_DLG_WAITING 沙漏
RES_ICON_DLG_ERROR 红叉
RES_ICON_DLG_COMPLETE 对勾
返回值:
0 第一个按钮(超时也返回这个)
1 第二个按钮
2 第三个按钮
显示汉字:
QString toUnicode(const char *str){
return QString::fromLocal8Bit(str, strlen(str));
}
然后启动程序的.desktop文件修改 Exec=程序名 -qws -font SSong