diff --git a/sources/pyside2/libpyside/dynamicqmetaobject.cpp b/sources/pyside2/libpyside/dynamicqmetaobject.cpp
index 77f24a1b..82a30d3c 100644
--- a/sources/pyside2/libpyside/dynamicqmetaobject.cpp
+++ b/sources/pyside2/libpyside/dynamicqmetaobject.cpp
@@ -57,6 +57,7 @@
 
 #include <cstring>
 #include <vector>
+#include <iostream>
 
 #include <QDebug>
 
@@ -568,10 +569,15 @@ void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
         Py_ssize_t pos = 0;
 
         while (PyDict_Next(attrs, &pos, &key, &value)) {
+            std::cerr << __FUNCTION__ << " key=" << Shiboken::debugPyObject(key)
+                      << " val=" << value << ' ' << Shiboken::debugPyObject(value) << '\n';
             if (QEnum::checkType(value)) {
+                std::cerr << __FUNCTION__ << " enum chk" << '\n';
                 auto data = reinterpret_cast<PySideQEnum *>(value);
+                std::cerr << __FUNCTION__ << " e " <<  data << '\n';
                 // Register enums.
                 PyObject *members = PyObject_GetAttr(value, PyUnicode_FromString("__members__"));
+                std::cerr << __FUNCTION__ << " members= " << members <<  '\n';
                 PyObject *items = PyMapping_Items(members);
                 Py_ssize_t n_items = PySequence_Length(items);
                 PyObject *className = PyObject_GetAttr(value, PyUnicode_FromString("__name__"));
diff --git a/sources/pyside2/libpyside/pysideqenum.cpp b/sources/pyside2/libpyside/pysideqenum.cpp
index 152a8836..b45cd836 100644
--- a/sources/pyside2/libpyside/pysideqenum.cpp
+++ b/sources/pyside2/libpyside/pysideqenum.cpp
@@ -49,6 +49,7 @@
 #include <signature.h>
 
 #include <QDebug>
+#include <iostream>
 
 extern "C"
 {
@@ -101,6 +102,7 @@ PyObject *qEnumCall(PyObject *self, PyObject *args, PyObject * /* kw */)
     }
 
     PyObject *klass = PyTuple_GetItem(args, 0);
+    std::cerr << __FUNCTION__ <<  ' ' << Shiboken::debugPyObject(klass) << '\n';
     bool validClass = false;
 
     // TODO
@@ -124,16 +126,19 @@ PyObject *qEnumCall(PyObject *self, PyObject *args, PyObject * /* kw */)
 }
 static PyObject *qEnumTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */)
 {
-    qDebug() << "qEnumTpNew";
+    std::cerr << __FUNCTION__ << ' ' << Shiboken::debugPyTypeObject(subtype)
+              << " subtype tp_basicsize=" << subtype->tp_basicsize
+              << " sizeof(PySideQEnum)=" << sizeof(PySideQEnum) << '\n';
     PySideQEnum *me = reinterpret_cast<PySideQEnum *>(subtype->tp_alloc(subtype, 0));
     me->d = new PySideQEnumPrivate;
     me->d->m_alreadyWrapped = false;
+    std::cerr << " self=" << me << " d=" << me->d << '\n';
     return reinterpret_cast<PyObject *>(me);
 }
 
 int qEnumTpInit(PyObject *self, PyObject *args, PyObject *kwds)
 {
-    qDebug() << "qEnumTpInit";
+    qDebug() << "qEnumTpInit" << self;
     if (kwds && PyTuple_Check(kwds) && PyTuple_Size(kwds) > 0) {
         PyErr_Format(PyExc_TypeError, "QEnum() takes exactly 0 named arguments (%zd given)", PyTuple_Size(kwds));
         return -1;
@@ -184,6 +189,8 @@ int qEnumTpInit(PyObject *self, PyObject *args, PyObject *kwds)
 
         PyObject *key = PySequence_GetItem(item, 0);
         PyObject *value_member = PySequence_GetItem(item, 1);
+        std::cerr << __FUNCTION__ <<  ' ' << Shiboken::debugPyObject(key) <<
+                  ' ' << Shiboken::debugPyObject(value_member) <<  '\n';
 
         Py_DECREF(item);
 
@@ -279,7 +286,7 @@ int qEnumTpInit(PyObject *self, PyObject *args, PyObject *kwds)
 
 void qEnumFree(void *self)
 {
-    qDebug() << "qEnumFree";
+    qDebug() << "qEnumFree" << self;
     auto pySelf = reinterpret_cast<PyObject *>(self);
     auto data = reinterpret_cast<PySideQEnum *>(self);
 
@@ -309,7 +316,7 @@ void init(PyObject *module)
 bool checkType(PyObject *pyObj)
 {
     if (pyObj)
-        return PyType_IsSubtype(Py_TYPE(pyObj), PySideQEnumTypeF()) || PyEnumMeta_Check(pyObj);
+        return PyType_IsSubtype(Py_TYPE(pyObj), PySideQEnumTypeF());
     return false;
 }
 
diff --git a/test_qenum.py b/test_qenum.py
index f83a89a7..9d9664a4 100644
--- a/test_qenum.py
+++ b/test_qenum.py
@@ -6,4 +6,12 @@ class Something(QObject):
         a = 1
         b = 2
         c = 3
-    QEnum(Priority)
+
+    en = QEnum(Priority)
+
+    def __init__(self, parent):
+        super(Something, self).__init__(parent)
+
+
+s = Something(None)
+print('Hello')
