On Freitag, 18. Dezember 2009, Phil Thompson wrote:
> On Fri, 18 Dec 2009 15:34:19 +0100, detlev <[email protected]>
> 
> wrote:
> > Hi,
> >
> > how do I port code like
> >
> >>>> l="hh"
> >>>> t=app.translate("Test", "s - %1 - e").arg(l)
> >
> > to the QString API version 2? I need to have the relocatable
> 
> placeholders.
> 
> Use Python's...
> 
>     t = app.translate("Test", "s - {0} - e").format(l)
> 

Thanks Phil. I didn't realize that this works in Python 2.6 already. I thought 
it was a Py3 feature.

Detlev
-- 
Detlev Offenbach
[email protected]
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to