PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 510 - There is no static version of QObject.tr method
: There is no static version of QObject.tr method
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-11-30 16:16 EET by Marcelo Lira
Modified: 2011-01-06 16:25 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcelo Lira 2010-11-30 16:16:02 EET
There is no static version of the QObject.tr method on PySide.

This should work

QObject.tr('Foo')
Comment 1 Matti Airas 2010-12-01 05:26:50 EET
Thanks. Prioritizing P3.
Comment 2 Marcelo Lira 2011-01-05 14:28:04 EET
The tr method needs the class name, which is not possible to get in a static
method of a Python derived class.
Example:

class MyObject(QObject)

in a call to

MyObject.tr(...)

tr will think it is being called as QObject.tr(...).
The only way to know from which class the method is being called is checking
the self.
Comment 3 renato filho 2011-01-06 16:25:22 EET
released on beta3