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

TypeError when comparing PySide6.QtCore.Qt.ItemFlags with None

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 6.x
    • PySide
    • None
    • bab4f34755 (pyside/pyside-setup/dev) bab4f34755 (pyside/tqtc-pyside-setup/dev) 7fe9b97640 (pyside/pyside-setup/6.3) e300795e43 (pyside/tqtc-pyside-setup/6.2) 7fe9b97640 (pyside/pyside-setup/wip/6.3_pypy) 7fe9b97640 (pyside/tqtc-pyside-setup/6.3)

    Description

      When comparing a PySide6.QtCore.Qt.ItemFlags value with a None value, it results in a TypeError.

      >>> from PySide6.QtCore import Qt
      >>> Qt.ItemIsEnabled != None
      True
      >>> Qt.ItemIsEnabled | Qt.ItemIsSelectable != None
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      TypeError: bad argument type for built-in operation
      >>>
      

      I didn't expect a TypeError to occur here.

      Attachments

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

        Activity

          People

            adherrma Adrian Herrmann
            bearduck Berend Klein Haneveld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes