Re: Qstrings to Strings
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). Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: Qstrings to Strings
On Thursday 03 September 2009 21:01, Stefan Behnel wrote: 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). PyQt4.5 supports Python 3, so I imagine that str() will be what you would use with that combination. For Python 2, unicode() is probably what most people want. David -- http://mail.python.org/mailman/listinfo/python-list
Qstrings to Strings
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 -- http://mail.python.org/mailman/listinfo/python-list