diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index ad533606613..547631fd57e 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -258,7 +258,7 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, ::xdg_surface *s } else { setToplevel(); if (transientParent) { - auto parentXdgSurface = static_cast(transientParent->shellSurface()); + auto parentXdgSurface = qobject_cast(transientParent->shellSurface()); if (parentXdgSurface) m_toplevel->set_parent(parentXdgSurface->m_toplevel->object()); }