[PyQt] Using Unicode
Raoul Snyman
raoul.snyman at saturnlaboratories.co.za
Wed Jun 17 10:05:31 BST 2009
Hi Gabriel,
On Wed, 17 Jun 2009 10:31:46 +0200, Gabriel Hahmann wrote:
> Are you saying something like this:
>
> QtGui.QPushButton(self.tr(u'&Next >'))
>
> Is that what you mean? Putting an "u" before each string? I´m looking
> some information about unicode and python and in a few pages I saw
> that is necessary to do something to decode and show this on screen,
> is that true?
That's correct. When you use the "print" command in Python, you need to
decode it back to ascii, but for things like Qt4, it's better to use
Unicode. Then your strings can contain umlauts and other non-english
characters.
--
Raoul Snyman, B.Tech IT (Software Engineering)
Saturn Laboratories
e: raoul.snyman at saturnlaboratories.co.za
w: http://www.saturnlaboratories.co.za/
b: http://blog.saturnlaboratories.co.za/
http://raoulsnyman.co.za/
More information about the PyQt
mailing list