[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] QString in PyQt4 - Request for Comments
From: Baz Walter <bazwal () ftml ! net>
Date: 2005-10-20 20:01:43
Message-ID: 200510202101.43447.bazwal () ftml ! net
[Download RAW message or body]
On Thursday 20 Oct 2005 07:51, Simon Edwards wrote:
>
> If methods like QTextEdit.text() could magically read minds and return a
> Python string or a QString when desired, then everyone would be happy. :-)
> Really, what we have in PyQt3 works fine with string except for in the case
> of return types.
>
Yes, at the moment we are having to write:
qt_str = QTextEdit.text()
py_str = unicode(QTextEdit.text())
... but possibly we'd like to write:
py_str = QTextEdit.text()
qt_str = QString(QTextEdit.text())
... such that the QString constructor somehow disables the default conversion
to a python unicode object and simply returns the original qstring.
Of course, this second part is total hand-waving. However, IMHO the syntax is
so nice that I thought it worth at least putting it out there.
Is there any way something like this could be made to work?
--
Baz Walter
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic