[SOLVED]Suggestions on implementing a proper settings dialog.
I am at that point in my app development where I want to created a settings/preferences dialog, in order for the user to be able to tweak various parameters.
What I intend to do is after creating the form, have it initialised every time the user presses the 'Settings' option, and deleted when he presses 'accept' or 'cancel'. Any changes he makes will be passed to my main app using signals and slots.
Are there any better ways of doing this, do you have any suggestions from your personal experience, or some other open source code that I could study to learn more?
as general rule your idea is correct.
If your dialog is very complex and it needs a lot of resources to load or if you want make it non-modal you can think to keep it in memory and using
show()when the user click on
hide()when it is accepted or cancelled
For the moment its quite simple, but it may well get extended in the future so I will keep it in memory. Thanks for the input.
you can decide also later how to handle it; I suggest to keep in memory only if you think that the user will use it very often otherwise there's no problem to create/destroy it when is needed