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 1117 - Adding an instance of QPrinter as a combo box's user data return None
: Adding an instance of QPrinter as a combo box's user data return None
Status: UNCONFIRMED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: Macintosh Mac OS
: P5 major
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2012-01-10 17:48 EET by Daniele Esposti
Modified: 2012-03-08 16:57 EET (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniele Esposti 2012-01-10 17:48:43 EET
QComboBox doesn't seem to store the QPrinter instance as the item's user data.

In this example the assert fails because the item data for the first item is
None instead of an instance of QPrinter class.


class Window(QtGui.QMainWindow):

    def __init__(self):
        super(Window, self).__init__()

        self.combo = QtGui.QComboBox(self)

        self.setCentralWidget(self.combo)

        printer = QtGui.QPrinterInfo.availablePrinters()[0]

        self.combo.addItem(printer.printerName(), QtGui.QPrinter(printer))

        # Fails
        assert(isinstance(self.combo.itemData(0), QtGui.QPrinter))
Comment 1 Matti Airas 2012-03-08 16:57:27 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!