diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 8dd5c158b015d31207d18e03e8fcdad5b30a1477..9e2f6ed9995ea9c0904ef91a4ff94a9e490d992d 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -51,8 +51,6 @@
 #include <QWindow>
 #include <private/qquickwindow_p.h>
 
-#include <private/qwidget_p.h>
-
 namespace QtWebEngineCore {
 
 class RenderWidgetHostViewQuickItem : public QQuickItem {
@@ -462,12 +460,6 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
         break;
     }
 
-    QEvent::Type type = event->type();
-    if (type == QEvent::FocusIn) {
-        QWidgetPrivate *d = QWidgetPrivate::get(this);
-        d->updateWidgetTransform(event);
-    }
-
     if (event->type() == QEvent::MouseButtonDblClick) {
         // QWidget keeps the Qt4 behavior where the DblClick event would replace the Press event.
         // QtQuick is different by sending both the Press and DblClick events for the second press