QItemEditorFactory can be used to register a custom editor for any QVariant types. However, QVariant can be extended by Q_DECLARE_METATYPE(MyType).
To register a custom editor for s custom type, one has to:
QItemEditorFactory *factory = new QItemEditorFactory();
"Type QVariant::type" states:
Returns the storage type of the value stored in the variant. Although this function is declared as returning QVariant::Type, the return value should be interpreted as QMetaType::Type.
Thus I'd like to propose that QItemEditorFactory::registerEditor and QItemEditorFactory::createEditor should accept QMetaType::Type instead QVariant::Type for improved usability.