Display mixed information on label
I would like to display on a label something like in C++ classic:
@cout << "Result = " << s << " Total number = " << tn; @
I know to display on label with @ui.label->setText(); @ but I don't know how to display a long message like above.
By the way, is there an easy way to display message on GUI in a similar-to-console style, for ex:
Only two line displayed at the same time: line 1 and 2, then line 2 and 3 (line 1 replaced by line 2, line 2 replaced by line 3). Could anyone please help me? Thanks!
QLabel label(QString("Result = %1 Total number = %2")
out << "Result = " << s << " Total number = " << tn;
To display the messages, you can use the class "QMessageBox":http://qt-project.org/doc/qt-5.0/qtwidgets/qmessagebox.html:
QMessageBox::information(0, "Title", "Message");