[PyKDE] Sugestions for PyQt4
Giovanni Bajo
rasky at develer.com
Wed Mar 22 13:04:43 GMT 2006
Eric Jardim <ericjardim at gmail.com> wrote:
>> How do you plan to modify pyuic4 so to infer the context without a
preceding
>>
>> "self."? It's going to be non-trivial.
>
>
> There is no need to change pyuic4 to get the context. We just have to
query
> the Python stack to know in which class we are calling the "tr" function.
> Someone (I think it was Bruno Silva) sugested this a long time ago. I
think
> it is still on the list archive.
Maybe I don't understand what you are proposing, but:
class Foo(QObject):
def bah(self):
QLabel(tr("Hello"), self)
pyuic4 needs to generate the .ts file where the "Hello" string is placed
within the "Foo" context. How do you plan to do that?
--
Giovanni Bajo
More information about the PyQt
mailing list