PDA

View Full Version : QSharedPointer casting



oldkentuckymark
10th October 2014, 06:07
anybody have experience with QSharedPointer
I'm trying to use qSharedPointerDynamicCast() to check and see if a sharedpointer is a certain type,
but I cant get any kind of casting to work on QSharedPointer

what is the correct syntax for a dynamic_cast on QSharedPointer?

wysota
10th October 2014, 07:11
QSharedPointer<SubType> subPtr = ptr.dynamic_cast<SubType>();