Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Convert from custom type to string

$
0
0
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?

Viewing all articles
Browse latest Browse all 4972

Trending Articles