diff --git a/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp b/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp
index 20edd73c6a6ff4bf0862b10c14dbdee74a2d0a4e..57e4a70477356435d3955599ac9aab04dfa802dd 100644
--- a/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp
+++ b/src/webenginewidgets/doc/snippets/qtwebengine_qwebengineview_snippet.cpp
@@ -36,22 +36,22 @@ void wrapInFunction()
 
 
 //! [2]
-    view->triggerAction(QWebPage::Copy);
+    view->triggerPageAction(QWebEnginePage::Copy);
 //! [2]
 
 
 //! [3]
-    view->page()->triggerPageAction(QWebPage::Stop);
+    view->page()->triggerAction(QWebEnginePage::Stop);
 //! [3]
 
 
 //! [4]
-    view->page()->triggerPageAction(QWebPage::GoBack);
+    view->page()->triggerAction(QWebEnginePage::Back);
 //! [4]
 
 
 //! [5]
-    view->page()->triggerPageAction(QWebPage::GoForward);
+    view->page()->triggerAction(QWebEnginePage::Forward);
 //! [5]
 
 //! [6]