问题描述
我正在尝试调整 QMessageBox,但不知何故我没有找到任何有关如何正确处理出现的消息框的 Windowlogo 和名称的信息。将按钮“ok”水平居中会更好。 到目前为止,我的代码(Qt/C++)以及解决 MessageBox 窗口图标和名称的方法:
// just for the color understanding
const QColor BG_COLOR = QColor(125,125,125);
QString setColorBG = "{background: rgb("
+ QString::number(BG_COLOR.red()) + ","
+ QString::number(BG_COLOR.green()) + ","
+ QString::number(BG_COLOR.blue()) + ");}";
QMessageBox msg;
msg.setText("Please select images.");
msg.setIcon(QMessageBox::Warning);
msg.setwindowIcon(QIcon()); // has no effect
msg.setwindowIconText("Warning"); // has no effect
msg.setStyleSheet("QMessageBox QPushButton{background: rgb(173,173,173);}"
"QMessageBox " + setColorBG);
msg.exec();
当前阅读“PanoramaCreator”的文本及其旁边的徽标是否可以通过类似的方法进行处理,或者是否需要完全不同的内容?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)