上一话题

Determining the default sensor for a type

下一话题

拖放

对话框窗口

An overview over dialog windows.

对话框可以是 modal , in which case the user is required to provide necessary information before work in the main window can continue, or modeless . Modeless dialogs do not prevent the user from interacting with any of the other windows in the application.

Qt 提供了一组现成对话框为文件、字体、颜色选择等。

PySide2.QtWidgets.QColorDialog

The QColorDialog class provides a dialog widget for specifying colors.

PySide2.QtWidgets.QFileDialog

QFileDialog 类提供允许用户选择文件 (或目录) 的对话框。

PySide2.QtWidgets.QFontDialog

QFontDialog 类提供用于选择字体的对话框 Widget。

PySide2.QtWidgets.QInputDialog

QInputDialog 类提供从用户获得单一值的简单方便对话框。

PySide2.QtWidgets.QMessageBox

QMessageBox 类提供模态对话框,用于告知用户或向用户询问问题并接收答案。

PySide2.QtWidgets.QProgressDialog

QProgressDialog 类提供慢操作进度反馈。

PySide2.QtPrintSupport.QPrintDialog

The QPrintDialog class provides a dialog for specifying the printer’s configuration.

PySide2.QtPrintSupport.QPageSetupDialog

QPageSetupDialog 类提供用于打印机页面相关选项的配置对话框。

PySide2.QtPrintSupport.QPrintPreviewDialog

QPrintPreviewDialog 类提供用于打印机输出而预览和配置页面布局的 Widget。

Custom dialogs can be easily created by composing regular widgets into a QDialog 。这些类是专门为构建自定义对话框而设计的:

PySide2.QtWidgets.QDialog

QDialog 类是对话框窗口的基类。

PySide2.QtWidgets.QDialogButtonBox

QDialogButtonBox 类是在适合当前小部件风格的布局中呈现按钮的 Widget。