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 1087 - Error when userValue of an Item added to combobox is an object
: Error when userValue of an Item added to combobox is an object
Status: NEW
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: All All
: P3 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-12-08 12:31 EET by Lucas Monge
Modified: 2012-03-08 16:57 EET (History)
9 users (show)

See Also:


Attachments
Example changed to show bug (8.15 KB, text/plain)
2011-12-08 12:31 EET, Lucas Monge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Monge 2011-12-08 12:31:29 EET
Created attachment 465 [details]
Example changed to show bug

Documentation says :

PySide.QtGui.QComboBox.addItem(icon, text[, userData=None])
Parameters:    
icon – PySide.QtGui.QIcon
text – unicode
userData – object


Changing example styles.py :
class Test :
    pass

class WidgetGallery(QtGui.QDialog):
    def __init__(self, parent=None):
        super(WidgetGallery, self).__init__(parent)

        self.originalPalette = QtGui.QApplication.palette()

        styleComboBox = QtGui.QComboBox()
        for k in QtGui.QStyleFactory.keys() :
            obj = Test()
            obj.value = k
            styleComboBox.addItem(k, obj)
.....


Error :

Traceback (most recent call last):
  File "styles.py", line 222, in <module>
    gallery = WidgetGallery()
  File "styles.py", line 41, in __init__
    styleComboBox.addItem(k, obj)
SystemError: ..\Objects\longobject.c:244: bad argument to internal function
Comment 1 Matti Airas 2012-03-08 16:57:21 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!