Re #7950. More changes for PyQt API change.

This is exactly the same change in several places. Previously the
toPyObject() turned the returned QVariant into the desired type.
Now the actual type is returned in the first place.
Merge branch 'feature/7950_pyqt_v2_api_for_qstring_qvariant' into develop