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

Testing if a QTreeWidgetItem belongs to a list raises a NotImplementedError

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.1, 6.0, 6.5.0
    • 1.1.0
    • PySide
    • c7904338f8707a30c70f1ddf62ec740cae255f36 (pyside/pyside-setup/5.15), f941bce2a (6.4), a997326ff (dev)

    Description

      Testing if a QTreeWidgetItem instance belongs to a Python list will cause a "NotImplementedError: operator not implemented." error.

      The problem shows when testing for pertenence using the "in" operator, as well as when using the "index" method of a Python list.

      The problem does not occur when using PyQt4 4.9.1

      I have created a small script to demonstrate the problem. To reproduce the bug, just run the program. The NotImplementedError message will be printed on the console and the program will exit. No window will be shown.

      Comment-out the line "from PySide import QtGui" and uncomment the line "from PyQt4 import QtGui" to run the program with PyQt4. In this case, a small window with a QTreeWidget will be shown.

      It must be pointed out that the problem occurs whether the item belongs or not to the list. Also, there is no need to create a QTreeWidget. An orphan QTreeWidgetItem cannot be tested for pertenence to a list as well.

      Attachments

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

        Activity

          People

            ctismer Christian Tismer
            julian_herrera Julian Alberto Herrera
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: