Qstrings to Strings

Stefan Behnel stefan_ml at behnel.de
Thu Sep 3 21:01:36 CEST 2009

Helvin wrote:
> Just wanted to say, to convert qstrings (or integers for that matter)
> to strings, use the str() function.
> http://learnwithhelvin.blogspot.com/2009/09/qstrings-and-strings.html

Hmmm, will that return a Unicode string? A byte string would be rather
inappropriate in most cases. I guess the unicode() function is the right
thing to use here (or the str() function in Py3 - no idea if that's
supported by Qt by now).


More information about the Python-list mailing list