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

QTranslator::translate null QString

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.2
    • PySide
    • None
    • All

      In Pyside6 there is no way to differentiate if QTranslator::translate returned a null string or an empty string.

      Both cases are cast to an empty python string.

      I would expect the null string to be cast to python None.

      from PySide6.QtCore import QTranslator
      t = QTranslator()
      # This returns a null QString which is cast to an empty python string.
      s = t.translate("thisis", "atest")
      assert s == ""

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            gentlegiantjgc J C
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes