Dialog boxes are commonly required in applications, whether to ask a question, present a form or merely alert the user to some information. Qt provides a wide variety of ready-made dialog boxes for common situations, as well as the capability to define custom dialog boxes of our own. In this section, we'll look at some of the more commonly used dialog box classes and take a stab at designing our own.
Standard dialog boxes
QMessageBox
QMessageBox is a simple dialog box used mainly to display short messages or ask yes-or-no questions. The simplest way to use QMessageBox is to take advantage of its convenient static methods, which create and show a dialog box with minimal fuss.
The six static methods are as follows:
Function... |
---|