QMessageBox is a Qt class that provides a modal window for informing the user or asking for a simple input (like "yes"/"no").
The simplest QMessageBox
to alert a user will look like this:
QMessageBox myBox;
myBox.setText("Hello, World!");
myBox.exec();
This will pop up a small modal window (which will block the rest of the interface until dismissed) with the text, and a standard "ok" button.
Basically the QMessageBox
provides text
for informing the user, informative text
for a more detailed explanation, and an optional detailed text
for even more additional info, should the user request it. The message box can also have standard buttons.
The official documentation can be found here for Qt 4.8 and here for Qt 5.