Unable to make qmlRegisterType work
问题 I've found some examples of qmlRegisterType on the internet but just can't make it work. I create a new Qt Quick 2 project and add the following contents: This is my .pro file: #Add more folders to ship with the application, here folder_01.source = qml/testlib folder_01.target = qml DEPLOYMENTFOLDERS = folder_01 #Libraries QT += core gui widgets #Additional import path used to resolve QML modules in Creator's code model QML_IMPORT_PATH = #Header files HEADERS += main.hpp #The .cpp file which