instar-robotics / papyrus

Papyrus is the front end GUI that generates neural scripts that can be executed by kheops
GNU General Public License v3.0
1 stars 0 forks source link

Fix the qgraphicsitem_cast #29

Open nschoe opened 5 years ago

nschoe commented 5 years ago

When inheriting from QGraphicsItem, you're supposed to provide an implementation to type() by setting an enum { Type = UserType + N } (N is different for each inheritance) so that a call to qgraphicsitem_cast works.

We haven't done that correctly, which means we are using dynamic_cast instead. I think it might be cleaner, more Qt-ish and (maybe?) for efficient to do so.