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 101 - QTableWidgetItem.setData fails if data is not QVariant
: QTableWidgetItem.setData fails if data is not QVariant
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2009-11-26 03:40 EET by itkach
Modified: 2010-03-24 16:47 EET (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description itkach 2009-11-26 03:40:08 EET
Code like this

item = QTableWidgetItem(text)
item.setData(Qt.DecorationRole, icon)

where icon is instance of QIcon works in PyQt 4.6
but fails with error in PySide 0.2.2

Boost.Python.ArgumentError: Python argument types in
    QTableWidgetItem.setData(QTableWidgetItem, ItemDataRole, QIcon)
did not match C++ signature:
    setData(QTableWidgetItem {lvalue}, int, QVariant)

This works in PySide:
item.setData(Qt.DecorationRole, QVariant(icon))
Comment 1 Lauro Moura 2010-01-06 17:29:08 EET
Fixed on commit 85c3ed7e1a1af27adbeaf37ecf4e4bf4d966cec3