C++ class exposed to QML error in fashion TypeError: Property '…' of object is not a function
问题 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: #ifndef UESQLDATABASE_H #define UESQLDATABASE_H #include <QObject> #include <QtSql/QSqlDatabase> class UeSqlDatabase : public QObject { Q_OBJECT Q_PROPERTY(bool m_ueConnected READ isConnected WRITE setConnected NOTIFY ueConnectedChanged) private: bool m_ueConneted; inline void setConnected(const bool& ueConnected) { this->m_ueConneted