问题描述
- Qt消息框怎么插入图片
-
void Widget::showfileButton() { QMessageBox customMsgBox; customMsgBox.setWindowTitle(tr("dialog")); QPushButton *yesBtn=customMsgBox.addButton(tr("Yes"),QMessageBox::ActionRole); customMsgBox.setText(tr("this is a dialog")); customMsgBox.setIconPixmap(QPixmap(":/new/prefix1/Hello.png")); customMsgBox.exec();//显示此消息框 //customMsgBox.Close(); return; }
各位大神,是路径不对吗,还是其他问题。急,在线等!
解决方案
时间: 2024-10-31 23:32:15