[PyQt] removeItemWidget bug

Phil Thompson phil at riverbankcomputing.com
Mon Apr 18 09:52:43 BST 2011

On Mon, 18 Apr 2011 00:34:44 +0100, Peter Morgan <pete at daffodil.uk.com>
> I've experienced a bug which after a few hours found someone else is
> experiencing also, and explained in detail
> In a Python program I use setItemWidget() to add widgets to columns
> of QTreeWidgetItems (eg QPushButton, QComboBox, etc).
> When a widget is no longer needed it is removed using
> however this action causes the removal of the QTreeWidgetItem itself
> instead of just removing the item widget attached by setItemWidget().
> Problem goes away if extra references to QTreeWidgetItems are kept
> somewhere outside the QTreeWidget instance.
> This problem does not occur in a C++ implementation.
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599612
> Are the pyqt developers aware of this?
> Regards
> Pete

Fixed in tonight's snapshot.

Thanks for reporting it. If the Debian maintainers had pushed it upstream
it would have been fixed 6 months ago.


More information about the PyQt mailing list