static_cast was changed to qobject_cast