Re #7950. Make sure variable is converted to the right type.

It seems that the settings are stored differently on different
platforms and on linux this was reading in as a string instead of a
boolean.
Merge branch 'feature/7950_pyqt_v2_api_for_qstring_qvariant' into develop