对话框
对话框可以是模态的,这种情况下用户必须先提供必要信息,主窗口才能继续操作;也可以是非模态的。非模态对话框不会阻止用户与应用程序中的其他窗口进行交互。
Qt 提供了一组现成的对话框,用于文件、字体、颜色选择等操作。
用于指定颜色的对话框控件 | |
提供一个对话框,允许用户选择文件或目录 | |
用于选择字体的对话框控件 | |
用于从用户处获取单一值的简单便捷对话框 | |
用于向用户提供信息或向用户提问并接收回答的模态对话框 | |
关于耗时操作进度的反馈 |
可以通过将常规控件组合到QDialog 中,轻松创建自定义对话框。以下类专门用于构建自定义对话框:
对话框窗口的基类 | |
根据当前控件样式,以适当布局呈现按钮的控件 |
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.