MNT: Update based on tacaswell's comment on the PR

More careful conversion from the return value of the Qt functions
to python string with six.text_type