Dialog Windows

Dialogs can be 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 provides a set of ready-made dialogs for file, font, color-selection and more.

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

Custom dialogs can be easily created by composing regular widgets into a QDialog. These classes are specifically designed for building custom dialogs:

QDialog

The base class of dialog windows

QDialogButtonBox

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

© 2020 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.