This function registers the Python type in the QML system with the name qmlName, in the library imported from uri having the version number composed from versionMajor and versionMinor. Returns the QML type id. For example, this registers a Python class MySliderItem as a QML type named Slider for version 1.0 of a module called "com.mycompany.qmlcomponents": :: qmlRegisterType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider") Once this is registered, the type can be used in QML by importing the specified module name and version number: :: import com.mycompany.qmlcomponents 1.0 Slider { ... } Note that it's perfectly reasonable for a library to register types to older versions than the actual version of the library. Indeed, it is normal for the new library to allow QML written to previous versions to continue to work, even if more advanced versions of some of its types are available. %PYARG_0 = %CONVERTTOPYTHON[int](PySide::qmlRegisterType(%1, %2, %3, %4, %5)); Shiboken::TypeResolver::createValueTypeResolver< QList<QObject*> >("QList<QObject*>"); PySide::initQmlSupport(module); QByteArray key("%FUNCTION_NAME_"); key.append(%1.toLocal8Bit()); Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(%PYSELF), key.constData(), %PYARG_2); if (PySide::nextQmlElementMemoryAddr) %0 = new (PySide::nextQmlElementMemoryAddr) ::QDeclarativePrivate::QDeclarativeElement<%TYPE>(); else %0 = new %TYPE(%1); <code># create our data ownerData = QDeclarativePropertyMap() ownerData.insert("name", "John Smith") ownerData.insert("phone", "555-5555") # expose it to the UI layer view = QDeclarativeView() ctxt = view.rootContext() ctxt.setContextProperty("owner", ownerData) view.setSource(QUrl.fromLocalFile("main.qml")) view.show()</code>