On Mac and Gnome, native applications use an application preferences dialog that immediately applies the chosen settings as they are selected. On Windows and (I think) KDE, preferences are applied only when an “Apply” or “OK” button is pressed.
Are there any built-in Qt goodies to do this for you, or do you have to include several #ifdef‘s in the dialog code to handle this (Q_WS_WIN, Q_WS_MAC, Q_WS_X11)?
If you have done something like this before (even using #ifdef‘s), could you share skeleton code as to how you pulled it off?
Looks like you have to spin your own. Here are the important parts of our solution. This could probably be generalized if someone is so inclined. I’m also able to assume certain things because of our business rules that may break other applications. The toggle is a macro that can be defined at compile-time:
YOUR_APP_APPLY_PREFERENCES_IMMEDIATELYpreferences_dialog.h
preferences_dialog.cpp