========================C++============================ #include #include #include #include class Foo: public QObject { Q_OBJECT Q_ENUMS(FooEnum) public: enum FooEnum { A, B }; }; class Bar: public QObject { Q_OBJECT public: public slots: void notWorkingSlotWithEnumArg(Foo::FooEnum slotValue) { qDebug() << "notWorkingSlotWithEnumArg slot worked with value:" << slotValue; } }; int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); qmlRegisterUncreatableType("Foo", 1, 0, "Foo"," prefix for enum"); qmlRegisterType("Bar", 1, 0, "Bar"); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); return app.exec(); } #include "main.moc" ========================C++============================ ========================Qml============================ import QtQuick 2.2 import QtQuick.Window 2.1 import Bar 1.0 import Foo 1.0 Window { visible: true width: 360 height: 360 MouseArea { anchors.fill: parent onClicked: { bar.notWorkingSlotWithEnumArg(Foo.A) Qt.quit(); } } Bar { id: bar } } ========================Qml============================