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    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to