I\'ve successfully exposed a C++ class to QML. It is registered and found in Qt Creator. It\'s purpose is to connect to a database, as shown in following code:
Be aware in case of an error some lines earlier in the same .js file can lead to this problem. The following code will not be executed.