I would like to have in a message box the following lines:
name:
surname:
data:
test:
After each :
I'll programmatically fill the line. I would like to ask how can I have this structure in a QMessageBox. It is possible?
I am a beginner in Qt Creator. Currently I learned to do this:
QMessageBox noc;
std::string s= "hello1";
QString er = s.c_str();
noc.setText(er);
noc.exec()
QString str;
str = QString("name: %1\nsurname: %2\ndata: %3").arg(...).arg(...).arg(...);
QMessageBox::information(0, "Title", str);
Take a look at QMessageBox::information() and QString::arg().