dynamic_cast does NOT (necessarily) work across shared libraries.
From experience: when you (try to) dynamic_cast a templated-type across shared libs with gcc, you are in trouble.
qobject_cast will work more often than dynamic_cast (usually). But (see threads) has its limitations, too.
Bookmarks