Hi to all,
I have list of QCanvasPolygonalItems which should be deleted when user wants to do so. As QT docs stated i used hide() in my derived class destructor then sometimes i started getting pure virtual func call errors or just segfaults. But after i dig into google about this problem, i found that it says that hide needs areaPoints() (i think it will be called sometime afterwards) which is pure virtual at base class. since virtual functions in c++ behave different than java and c#; using virtual functions is not recommended at constructors and destructors. But obviously i only used hide() in my destructor. And QT says hide() must be called. How can i delete preventing pure virtual func called or segfault. Exactly same problem was reported to trolltech at the below links:
http://lists.trolltech.com/qt-intere.../msg00692.html
as stated before problem appears when i try to delete qcanvaspolygonalitems.
Note: i also tried to call hide() before deleting the object. but this didn't solve the problem.
Bookmarks