[PyQt] QStandardItemEditorCreator missing

Wolfgang Rohdewald wolfgang at rohdewald.de
Thu Nov 25 23:03:39 GMT 2010


On Donnerstag 25 November 2010, Hans-Peter Jansen wrote:
> If you run the scripts, and press "Arrow left", "blank",
> "Arrow down",  "Return", "Return", something similar the
> following is printed:

you probably mean "Arrow right", "blank",
"Arrow down",  "Return", "Return"

I attached the interesting parts of valgrind output.

-- 
Wolfgang
-------------- next part --------------
valgrind --trace-children=yes ./coloreditorfactory-qvariant.py 
....
==14984== Invalid read of size 4
==14984==    at 0x935C6B9: void v_construct<QColor>(QVariant::Private*, void const*, QColor*) (qcolor.h:292)
==14984==    by 0x935B246: construct(QVariant::Private*, void const*) (qguivariant.cpp:105)
==14984==    by 0x78784BE: QVariant::QVariant(int, void const*) (qvariant.cpp:1670)
==14984==    by 0x7862A97: QMetaProperty::read(QObject const*) const (qmetaobject.cpp:2222)
==14984==    by 0x786B946: QObject::property(char const*) const (qobject.cpp:3469)
==14984==    by 0x991B52E: QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const (qstyleditemdelegate.cpp:538)
==14984==    by 0x9872125: QAbstractItemView::commitData(QWidget*) (qabstractitemview.cpp:2759)
==14984==    by 0x8B2169A: sipQTableWidget::commitData(QWidget*) (sipQtGuipart2.cpp:29575)
==14984==    by 0x986C377: QAbstractItemView::qt_metacall(QMetaObject::Call, int, void**) (moc_qabstractitemview.cpp:247)
==14984==    by 0x98A1B34: QTableView::qt_metacall(QMetaObject::Call, int, void**) (moc_qtableview.cpp:118)
==14984==    by 0x98DE675: QTableWidget::qt_metacall(QMetaObject::Call, int, void**) (moc_qtablewidget.cpp:135)
==14984==    by 0x8B220EB: sipQTableWidget::qt_metacall(QMetaObject::Call, int, void**) (sipQtGuipart2.cpp:28863)
==14984==  Address 0x117aa88c is 12 bytes inside a block of size 32 free'd
==14984==    at 0x4C27A83: operator delete(void*) (vg_replace_malloc.c:387)
==14984==    by 0x9358B9F: clear(QVariant::Private*) (qvariant_p.h:142)
==14984==    by 0x7878B8E: QVariant::clear() (qvariant.cpp:1862)
==14984==    by 0x787A9C2: QVariant::operator=(QVariant const&) (qvariant.cpp:1803)
==14984==    by 0x7447F7E: Chimera::fromPyObject(_object*, QVariant*, bool) const (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7441F97: qt_metacall_worker(_sipSimpleWrapper*, _typeobject*, _sipTypeDef*, QMetaObject::Call, int, void**) (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7442141: qpycore_qobject_qt_metacall(_sipSimpleWrapper*, _sipTypeDef*, QMetaObject::Call, int, void**) (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)

==14984==    by 0x7862A6A: QMetaProperty::read(QObject const*) const (qmetaobject.cpp:2216)
==14984==    by 0x786B946: QObject::property(char const*) const (qobject.cpp:3469)
==14984==    by 0x991B52E: QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const (qstyleditemdelegate.cpp:538)
==14984==    by 0x9872125: QAbstractItemView::commitData(QWidget*) (qabstractitemview.cpp:2759)
==14984==    by 0x8B2169A: sipQTableWidget::commitData(QWidget*) (sipQtGuipart2.cpp:29575)
==14984== 
==14984== Invalid read of size 8
==14984==    at 0x935C6C0: void v_construct<QColor>(QVariant::Private*, void const*, QColor*) (qcolor.h:293)
==14984==    by 0x935B246: construct(QVariant::Private*, void const*) (qguivariant.cpp:105)
==14984==    by 0x78784BE: QVariant::QVariant(int, void const*) (qvariant.cpp:1670)
==14984==    by 0x7862A97: QMetaProperty::read(QObject const*) const (qmetaobject.cpp:2222)
==14984==    by 0x786B946: QObject::property(char const*) const (qobject.cpp:3469)
==14984==    by 0x991B52E: QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const (qstyleditemdelegate.cpp:538)
==14984==    by 0x9872125: QAbstractItemView::commitData(QWidget*) (qabstractitemview.cpp:2759)
==14984==    by 0x8B2169A: sipQTableWidget::commitData(QWidget*) (sipQtGuipart2.cpp:29575)
==14984==    by 0x986C377: QAbstractItemView::qt_metacall(QMetaObject::Call, int, void**) (moc_qabstractitemview.cpp:247)
==14984==    by 0x98A1B34: QTableView::qt_metacall(QMetaObject::Call, int, void**) (moc_qtableview.cpp:118)
==14984==    by 0x98DE675: QTableWidget::qt_metacall(QMetaObject::Call, int, void**) (moc_qtablewidget.cpp:135)
==14984==    by 0x8B220EB: sipQTableWidget::qt_metacall(QMetaObject::Call, int, void**) (sipQtGuipart2.cpp:28863)
==14984==  Address 0x117aa890 is 16 bytes inside a block of size 32 free'd
==14984==    at 0x4C27A83: operator delete(void*) (vg_replace_malloc.c:387)
==14984==    by 0x9358B9F: clear(QVariant::Private*) (qvariant_p.h:142)
==14984==    by 0x7878B8E: QVariant::clear() (qvariant.cpp:1862)
==14984==    by 0x787A9C2: QVariant::operator=(QVariant const&) (qvariant.cpp:1803)
==14984==    by 0x7447F7E: Chimera::fromPyObject(_object*, QVariant*, bool) const (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7441F97: qt_metacall_worker(_sipSimpleWrapper*, _typeobject*, _sipTypeDef*, QMetaObject::Call, int, void**) (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7442141: qpycore_qobject_qt_metacall(_sipSimpleWrapper*, _sipTypeDef*, QMetaObject::Call, int, void**) (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7862A6A: QMetaProperty::read(QObject const*) const (qmetaobject.cpp:2216)
==14984==    by 0x786B946: QObject::property(char const*) const (qobject.cpp:3469)
==14984==    by 0x991B52E: QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const (qstyleditemdelegate.cpp:538)
==14984==    by 0x9872125: QAbstractItemView::commitData(QWidget*) (qabstractitemview.cpp:2759)
==14984==    by 0x8B2169A: sipQTableWidget::commitData(QWidget*) (sipQtGuipart2.cpp:29575)
==14984== 
==14984== Invalid read of size 2
==14984==    at 0x935C6C9: void v_construct<QColor>(QVariant::Private*, void const*, QColor*) (qcolor.h:293)
==14984==    by 0x935B246: construct(QVariant::Private*, void const*) (qguivariant.cpp:105)
==14984==    by 0x78784BE: QVariant::QVariant(int, void const*) (qvariant.cpp:1670)
==14984==    by 0x7862A97: QMetaProperty::read(QObject const*) const (qmetaobject.cpp:2222)
==14984==    by 0x786B946: QObject::property(char const*) const (qobject.cpp:3469)
==14984==    by 0x991B52E: QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const (qstyleditemdelegate.cpp:538)
==14984==    by 0x9872125: QAbstractItemView::commitData(QWidget*) (qabstractitemview.cpp:2759)
==14984==    by 0x8B2169A: sipQTableWidget::commitData(QWidget*) (sipQtGuipart2.cpp:29575)
==14984==    by 0x986C377: QAbstractItemView::qt_metacall(QMetaObject::Call, int, void**) (moc_qabstractitemview.cpp:247)
==14984==    by 0x98A1B34: QTableView::qt_metacall(QMetaObject::Call, int, void**) (moc_qtableview.cpp:118)
==14984==    by 0x98DE675: QTableWidget::qt_metacall(QMetaObject::Call, int, void**) (moc_qtablewidget.cpp:135)
==14984==    by 0x8B220EB: sipQTableWidget::qt_metacall(QMetaObject::Call, int, void**) (sipQtGuipart2.cpp:28863)
==14984==  Address 0x117aa898 is 24 bytes inside a block of size 32 free'd
==14984==    at 0x4C27A83: operator delete(void*) (vg_replace_malloc.c:387)
==14984==    by 0x9358B9F: clear(QVariant::Private*) (qvariant_p.h:142)
==14984==    by 0x7878B8E: QVariant::clear() (qvariant.cpp:1862)
==14984==    by 0x787A9C2: QVariant::operator=(QVariant const&) (qvariant.cpp:1803)
==14984==    by 0x7447F7E: Chimera::fromPyObject(_object*, QVariant*, bool) const (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7441F97: qt_metacall_worker(_sipSimpleWrapper*, _typeobject*, _sipTypeDef*, QMetaObject::Call, int, void**) (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7442141: qpycore_qobject_qt_metacall(_sipSimpleWrapper*, _sipTypeDef*, QMetaObject::Call, int, void**) (in /usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
==14984==    by 0x7862A6A: QMetaProperty::read(QObject const*) const (qmetaobject.cpp:2216)
==14984==    by 0x786B946: QObject::property(char const*) const (qobject.cpp:3469)
==14984==    by 0x991B52E: QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const (qstyleditemdelegate.cpp:538)
==14984==    by 0x9872125: QAbstractItemView::commitData(QWidget*) (qabstractitemview.cpp:2759)
==14984==    by 0x8B2169A: sipQTableWidget::commitData(QWidget*) (sipQtGuipart2.cpp:29575)
==14984== 
ColorListEditor.setColor(#000000) <PyQt4.QtGui.QColor object at 0x11dbc3f8> False
item0: <PyQt4.QtGui.QColor object at 0x11dbc390> #f0f8ff
item1: <PyQt4.QtGui.QColor object at 0x11dbc328> #faebd7
current index 1
found index: -1
invalid index




More information about the PyQt mailing list