[PyQt] Chinese characters

Tore Knabe tore.knabe at gmail.com
Sat Dec 3 17:14:02 GMT 2011


Hi,

I am having trouble with Chinese characters strings. Each character itself
seems to be drawn okay, but the following character starts at the same
position, on top of the previous one. Some Chinese characters don't seem to
have that problem, but most have, especially the most common ones. Here is
a short program that demonstrates the problem: the Label should show a
string of three characters, but they are drawn on top of each other.


#!/usr/bin/python
#-*- coding:utf8 -*-

from PyQt4.QtGui import *
from PyQt4.QtCore import *
import sys


app=QApplication(sys.argv)

label = QLabel("的一是")
label.resize(100, 80)
label.show()
label.raise_()

app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
app.exec_()




Any help is appreciated.
Tore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20111203/b26da318/attachment.html>


More information about the PyQt mailing list