diff --git a/examples/quick/demos/photosurface/photosurface.qml b/examples/quick/demos/photosurface/photosurface.qml
index 53e0edffbecd2e67e4bd99dd229065ba51daff0c..4f7100358f14e27c72dc2757743dde787e6f43aa 100644
--- a/examples/quick/demos/photosurface/photosurface.qml
+++ b/examples/quick/demos/photosurface/photosurface.qml
@@ -39,13 +39,14 @@
 ****************************************************************************/
 import QtQuick 2.0
 import QtQuick.Dialogs 1.0
+import QtQuick.Window 2.1
 import Qt.labs.folderlistmodel 1.0
 
-Rectangle {
+Window {
     id: root
+    visible: true
     width: 1024; height: 600
     color: "black"
-    visible: true
     property int highestZ: 0
     property real defaultSize: 200
 
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp
index 9c5fb88af214208c5abcdc65a48ab5c2a52c10b3..7ef07e4896e06def36193ef7843bd68d8b2a1bcb 100644
--- a/tests/auto/quick/examples/tst_examples.cpp
+++ b/tests/auto/quick/examples/tst_examples.cpp
@@ -89,6 +89,7 @@ tst_examples::tst_examples()
     // Add files to exclude here
     excludedFiles << "examples/quick/canvas/tiger/tiger.qml"; // QTBUG-26528
     excludedFiles << "snippets/qml/listmodel/listmodel.qml"; //Just a ListModel, no root QQuickItem
+    excludedFiles << "examples/quick/demos/photosurface/photosurface.qml"; // root item is Window rather than Item
 
     // Add directories you want excluded here (don't add examples/, because they install to examples/qtdeclarative/)
     excludedDirs << "shared"; //Not an example