Qt 在QMessageBox中显示参数->;塞特克斯

Qt 在QMessageBox中显示参数->;塞特克斯,qt,qlineedit,qmessagebox,Qt,Qlineedit,Qmessagebox,我将QMessageBox定义为 m_setting2 = new QMessageBox(); m_setting2->setWindowTitle("NOTE"); m_setting2->setText("RESETTING PREFERENTIAL VALUE TO "); m_setting2->show(); 其中m_setting2是我的QMessageBox* 现在,在setText中的VALUE TO之后,我想添加一个参数,它是取自QLineEdit的整数。

我将
QMessageBox
定义为

m_setting2 = new QMessageBox();
m_setting2->setWindowTitle("NOTE");
m_setting2->setText("RESETTING PREFERENTIAL VALUE TO ");
m_setting2->show();
其中
m_setting2
是我的
QMessageBox*

现在,在
setText
中的
VALUE TO
之后,我想添加一个参数,它是取自
QLineEdit
的整数。此整数存储在
valuee

那么,如何将
值之后的整数打印到

在某个地方,我看到它应该是类似于
QString(“%1”).arg(valuee)
的东西,但它不起作用

请帮帮我,谢谢你的关心

int value = 5;
QString text = QString("RESETTING PREFERENTIAL VALUE TO %1").arg(value);
m_setting2->setText(text);