Hi Jurgen,

I needed this for subprocess.call/Popen since it does not accept QStrings.
I always read at doc.qt.nokia, that's where I found it.
http://qt-project.org/doc/qt-4.8/qstring.html#toStdString
" This operator is only available if Qt is configured with STL compatibility enabled."

I thought that everything in qt was in pyqt, but this is apparently not true.

I finally end up using str("%s" % myString), which works.

Thanks a lot for your answer.

Denis



On 04/11/2012 10:39 AM, Jürgen E. Fischer wrote:
Hi Denis,

On Wed, 11. Apr 2012 at 09:49:41 +0200, Denis Rouzaud wrote:
    I have an error when I try to use toStdString method on a QString:
    AttributeError: 'QString' object has no attribute 'toStdString'
    Someone has a clue on this???
Apparently PyQt doesn't have that method[1].  What do you need that for in
Python?


Jürgen


[1] http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html

_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to