Dialog Windows

对话框可以设置 模态非模态, 模态用于在主窗口继续工作之前提供必要信息. 非模态对话框不会阻止用户继续与应用程序中的任何其他窗口交互.

Qt为文件, 字体, 颜色等提供一组现成的对话框.

QColorDialog

Dialog widget for specifying colors

QFileDialog

Dialog that allow users to select files or directories

QFontDialog

Dialog widget for selecting a font

QInputDialog

Simple convenience dialog to get a single value from the user

QMessageBox

Modal dialog for informing the user or for asking the user a question and receiving an answer

QProgressDialog

Feedback on the progress of a slow operation

将常规widget组合到 QDialog可以轻松实现自定义对话框. 下列类是专门为构建自定义对话框而设计:

QDialog

The base class of dialog windows

QDialogButtonBox

Widget that presents buttons in a layout that is appropriate to the current widget style