Wrap_python build error in qt loadable widget

Hi,

In custom qt loadable extension, I set "WRAP_PYTHON" and include "ctkDICOMDisplayedFieldGeneratorRuleFactory".

I found this class is singleton and generate wrapper itself

private:
 ...
  friend class PythonQtWrapper_ctkDICOMDisplayedFieldGeneratorRuleFactory; // Allow Python wrapping without enabling direct instantiation

but , in generated_cpp folder , the xxxxPythonQt project build fails becasue the constructer ctkDICOMDisplayedFieldGeneratorRuleFactory is private

class PythonQtWrapper_ctkDICOMDisplayedFieldGeneratorRuleFactory : public QObject
{
...
  ctkDICOMDisplayedFieldGeneratorRuleFactory* new_ctkDICOMDisplayedFieldGeneratorRuleFactory(QObject*  parent = 0)
    {
    return new ctkDICOMDisplayedFieldGeneratorRuleFactory(parent);
    }
...
};

can anyone help to solve it?