diff --git a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
index 6f66e50482c742b1712981123b12fbd4226c7018..926c4a5d7e0e0e9af5d8e510af2e27356d223eb7 100644
--- a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
+++ b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
@@ -758,6 +758,8 @@ void BrowserMainWindow::slotFilePrintToPDF()
 #ifndef QT_NO_PRINTER
 void BrowserMainWindow::slotHandlePagePrinted(bool result)
 {
+    Q_UNUSED(result);
+
     delete m_currentPrinter;
     m_currentPrinter = nullptr;
 }