KConfigDialog
The standard KDE QtWidgets configuration dialog
If you need a configuration dialog for your QtWidgets application, use KConfigDialog.
KConfigDialog handles the enabling and disabling of buttons, creation of the dialog, and deletion of the widgets. Because of KConfigDialogManager, this class also manages: restoring the settings, resetting them to the default values, and saving them.
This requires that the names of the widgets corresponding to configuration entries have to have the same name plus an additional "kcfg_" prefix. For example the widget named "kcfg_MyOption" would be associated with the configuration entry "MyOption".
Here is an example usage of KConfigDialog:
Other than the above code, each class that has settings in the dialog should have a loadSettings() type slot to read settings and perform any necessary changes.
For dialog appearance options (like buttons, default button, ...) please see KPageDialog.
For more information, consult the api documentation of KConfigDialog
Last updated