great I'll have a look at qobject_cast

thanks