Sets the preference settings associated with string key to value. Argument value should be a Lua value that can be converted into a QVariant.