Do not call value() without casting the object pointer to the right type.

This did work as long as you were not looking at objects with multi-
inheritance. That's however not the case with widgets or QGV, which
were crashing with rather bizarre backtraces since we were calling
methods on pointers to the wrong base class. Wild void pointer casting,
what could possibly go wrong? ;)