Convert from custom type to string
-
Hi. I'm register converter for my type, but in qml I get error: Error: Cannot assign QObject* to QString.
C++
@
...
QString convert( const IServer* srv )
{
return srv->name();
}
...
qmlRegisterUncreatableType<IServer>( "plugin", 1, 0, "IServer", "" );
...
QMetaType::registerConverter<IServer*, QString>( convert );
@Is it possible convert my type to string in qml?