Details
-
Bug
-
Resolution: Done
-
P2: Important
-
1.1.0
-
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.