Skip to content

Overriding method itemChange() not possible in Python for QAbstractGraphicsShapeItem derived classes #75

@mbarann

Description

@mbarann

Overriding method itemChange() ist not possible in Python for QAbstractGraphicsShapeItem derived classes, e.g. when sub classing QGraphicsRectItem.

This is caused by not including the itemChange() method in the generated code of class PythonQtShell_QGraphicsRectItem:
https://github.com/MeVisLab/pythonqt/blob/master/generated_cpp_511/com_trolltech_qt_gui/com_trolltech_qt_gui3.h#L457

Class PythonQtShell_QGraphicsPixmapItem, which does not derive from QAbstractGraphicsShapeItem, contains this method:
https://github.com/MeVisLab/pythonqt/blob/master/generated_cpp_511/com_trolltech_qt_gui/com_trolltech_qt_gui3.h#L110

After debugging the code generator, I found that the traversal of the base class hierarchy ignores the interface classes from which any super class inherits:
https://github.com/MeVisLab/pythonqt/blob/master/generator/abstractmetalang.cpp#L1632

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions