Or just use standard C++ dynamic_cast<T>(). qobject_cast and qgraphicsitem_cast are only necessary for apps that are compiled with RTTI disabled; mostly for embedded apps, or for old compilers. For modern apps, I just use dynamic_cast ;-).
Note: qgraphicsitem_cast does not support polymorphic casts.




Reply With Quote
Bookmarks