Re: [PyKDE] Converting font names to python strings

2005-04-19 Thread Giovanni Bajo
Jeremy Sanders <[EMAIL PROTECTED]> wrote: >> You could use unicode(i) to convert QString to a Python unicode string. >> Either that, or keep the QString. It pretty much depends on what you are >> going to do with that families dict. > > Excellent. I'm doing things like > > if 'Times New Roman' i

Re: [PyKDE] Converting font names to python strings

2005-04-19 Thread Jeremy Sanders
On Tue, 19 Apr 2005, Giovanni Bajo wrote: You could use unicode(i) to convert QString to a Python unicode string. Either that, or keep the QString. It pretty much depends on what you are going to do with that families dict. Excellent. I'm doing things like if 'Times New Roman' in families: # do

Re: [PyKDE] Converting font names to python strings

2005-04-19 Thread Fredrik Juhlin
On Tue, 2005-04-19 at 14:34 +0100, Jeremy Sanders wrote: > One of my users is having problems with my code. It looks like it might be > to do with converting QStrings to Python strings if they are unicode: > > The code is: > > db = qt.QFontDatabase() > > # build a dict up with

Re: [PyKDE] Converting font names to python strings

2005-04-19 Thread Giovanni Bajo
Jeremy Sanders <[EMAIL PROTECTED]> wrote: > One of my users is having problems with my code. It looks like it might be > to do with converting QStrings to Python strings if they are unicode: > > The code is: > > db = qt.QFontDatabase() > > # build a dict up with the list of famil

[PyKDE] Converting font names to python strings

2005-04-19 Thread Jeremy Sanders
One of my users is having problems with my code. It looks like it might be to do with converting QStrings to Python strings if they are unicode: The code is: db = qt.QFontDatabase() # build a dict up with the list of families families = {} for i in db.families():