我正在尝试调整 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”的文本及其旁边的徽标是否可以通过类似的方法进行处理,或者是否需要完全不同的内容?