diff --git a/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp
index 71a3151c1ff3684ba7f6aa43cea7510d81682825..f543f9de3ea375ad75b497c3a28523088ce070d3 100644
--- a/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp
@@ -58,7 +58,9 @@
 #include <QFileInfo>
 #include <QFileSystemWatcher>
 #include <QPixmapCache>
+#ifndef QT_NO_WEBKIT
 #include <QGraphicsWebView>
+#endif
 
 #include <QTextDocument>
 
@@ -733,9 +735,13 @@ void allSubObject(QObject *object, QObjectList &objectList)
 
 static void disableTiledBackingStore(QObject *object)
 {
+#ifndef QT_NO_WEBKIT
     QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(object);
     if (webView)
         webView->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, false);
+#else
+    Q_UNUSED(object);
+#endif
 }
 
 void ObjectNodeInstance::tweakObjects(QObject *object)