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

__future__ unicode_literals breaks tr()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.0
    • 1.1.0, 1.1.1, 1.1.2
    • PySide
    • 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

        For Gerrit Dashboard: PYSIDE-100
        # Subject Branch Project Status CR V

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            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