PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 380 - Cannot use a customer editor widget with an item delegate
: Cannot use a customer editor widget with an item delegate
Status: CLOSED DUPLICATE of bug 360
Product: PySide
Classification: Unclassified
Component: PySide
: 0.4.1
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-09-23 08:03 EEST by Michael
Modified: 2010-10-13 13:51 EEST (History)
8 users (show)

See Also:


Attachments
example script that fails in pyside (2.76 KB, text/x-python)
2010-09-23 08:03 EEST, Michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2010-09-23 08:03:28 EEST
Created attachment 95 [details]
example script that fails in pyside

Create a List Model and a custom delegate with a combobox editor widget. The
setModelData method seems to be called with the wrong widget, i.e. a widget
that doesn't support currentText.

I have attached a script that works in PyQt4 and fails in PySide.

Traceback (most recent call last):
  File "bug.py", line 92, in flags
    return Qt.ItemFlags(QAbstractListModel.flags(self, index) |
Qt.ItemIsEditable)
  File "bug.py", line 47, in setModelData
    model.setData(index, editor.currentText(), Qt.EditRole)
AttributeError: 'PySide.QtGui.QWidget' object has no attribute 'currentText'
Comment 1 renato filho 2010-09-24 17:48:17 EEST
this is the same problem found in bug #360

*** This bug has been marked as a duplicate of bug 360 ***