[PyKDE] QString conversion?

Ted Parnefors ted at mtv.se
Wed Jan 24 19:56:44 GMT 2001


Is there really no other way than the following to convert a QString to
a string in the system locale?

import locale
from qt import *
syslocale=locale.getdefaultlocale()[1]
myqstring=QString(u'åäö')
mystring=eval(repr(myqstring)).encode(syslocale)

-- 

 Ted Parnefors <ted at mtv.se>, KeyID 0x6627DEE4
 PGP Fingerprint 1C39FA94703EB54A011CF18932018E256627DEE4





More information about the PyQt mailing list