I reimplement the itemChange funciton in my custo QGraphicsItem.
std::cout<<"item "<<type()<<" change"<<std::endl;
}
QVariant rectItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value){
std::cout<<"item "<<type()<<" change"<<std::endl;
QGraphicsRectItem::itemChange(change,value);
}
To copy to clipboard, switch view to plain text mode
When i execute the program, i get this error after I insert an item in my scene........
"*** glibc detected *** ./qt_program: free(): invalid pointer: 0xbfa28b50 ***"
What's wrong with the implementation? Without the ridefinition of this function, the program works well..........
GDB gives me this error:
"Program received signal SIGSEGV, Segmentation fault.
0xb7e52ab6 in ?? () from /usr/lib/libQtGui.so.4"
Bookmarks