[PyKDE] RedHat 7.3; kde3.0; Python PyQt

Viorel Preoteasa viorelpreoteasa at hotmail.com
Tue May 21 00:49:00 BST 2002


>Viorel Preoteasa wrote:
> >
> > I am trying to tell sip/.configure where my python2.2 dir is, but it
> > complains about missing sip.h. This is in python1.5 include dir but not 
>in
> > python2.2
>
>I don't understand. sip's ./configure doesn't check for sip.h. PyQt's
>does. Like I said in my original response, you need to tell sip's
>./configure and PyQt's ./configure the path to the correct Python
>interpreter so that things get found and installed in the right place.
>
Yes it is true, I did it wrong, I was by mistake in the PyQt dir when trying 
to install sip. It worked when I installed sip first and after PyQt.

But I have some other problem: Mainly I wanted to have unicode character 
support. So I compiled PyQt using Python2.2 and qt3.?. But when I try my 
application that should dispaly u'test' in a QTextEdit I get "t e" and the 
cursor goes around as would be three characters. What is wrong? the program 
I tried is:

import sys
from qt import *

class ApplicationWindow(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self, 'mw', Qt.WDestructiveClose)

        self.e = QTextEdit(self,'editor')
        self.e.setFocus()
        self.setCentralWidget(self.e)
        s = QString('test string')
        s = QString(u'test unicode: \u03b1\u03b2\u03b3\u03b4\ue3b5')
        s = QString(u'test')
        self.e. setText(s)

a = QApplication(sys.argv)
mw = ApplicationWindow()
mw.setCaption('Unicode test')
mw.show()
a.connect(a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()'))
a.exec_loop()





_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com




More information about the PyQt mailing list