Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-100

__future__ unicode_literals breaks tr()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 1.1.0, 1.1.1, 1.1.2, dev
    • Fix Version/s: dev
    • Component/s: PySide
    • Commits:
      ddbd93680730811a5020b4d429c2e3e11d6823e3

      Description

      The following SHOULD print 'foo', but it prints nothing.
      If the import line is commented out, this behaves as expected.

      from __future__ import unicode_literals
      import sys
      from PySide.QtGui import *
      
      class Window(QMainWindow):
          def __init__(self):
              super(Window, self).__init__()
              print self.tr('foo')
      
      app = QApplication(sys.argv)
      Window().show()
      sys.exit(app.exec_())
      

        Attachments

        1. pyside-100.py
          0.3 kB
          Christian Tismer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            dmd3eorg Daniel Drucker
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes