diff --git a/src/plugins/qmlinspector/components/objecttree.cpp b/src/plugins/qmlinspector/components/objecttree.cpp
index 7c1537567225fe8ec504871e14e6853bae1c5742..05f4fc2d18e913872e71f1f402b854ae659741ad 100644
--- a/src/plugins/qmlinspector/components/objecttree.cpp
+++ b/src/plugins/qmlinspector/components/objecttree.cpp
@@ -38,6 +38,8 @@
 
 #include "objecttree.h"
 
+Q_DECLARE_METATYPE(QmlDebugObjectReference)
+
 ObjectTree::ObjectTree(QmlEngineDebug *client, QWidget *parent)
     : QTreeWidget(parent),
       m_client(client),