Use static_cast instead of qobject_cast with private models in tag search dialog