#ifndef SETTINGS_H #define SETTINGS_H #include #include class Settings : public QSettings { Q_OBJECT Q_ENUMS(QSettings::Scope) public: explicit Settings(QObject *parent = 0) : QSettings(parent) {} Q_INVOKABLE QSettings::Scope getMethod() { emit getSignal(QSettings::UserScope); return QSettings::UserScope; } public slots: QSettings::Scope getSlot() { emit getSignal(QSettings::SystemScope); return QSettings::SystemScope; } signals: void getSignal(QSettings::Scope scope); }; Q_DECLARE_METATYPE(QSettings::Scope) #endif // SETTINGS_H