This question was previously asked in 2012. So, now 7 years later I am wondering if the answer might be different, also my use case is a little different.
A plugin offers the user a choice of three log level settings: info, trace, debug. This works fine in a menu (Menu item or plugin config) . However, when the menu opens I would like it to be set to the current level setting (as stored in the plugin preferences or set in plugin.py). The actual menu items are constant. I know I can provide the entire menu via a dynamic list - but I don't see any option to set the default using that approach. So, is there a way to make the default setting for a configUI menu dynamic?