1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
PySolFC/kcardgame/binding-example/qobjectwithenum.cpp
2020-11-12 11:38:49 +02:00

19 lines
490 B
C++

#include "qobjectwithenum.h"
#include <QDebug>
#include <QMetaEnum>
QObjectWithEnum::QObjectWithEnum(QObject *parent) : QObject(parent)
{
}
QString QObjectWithEnum::nonSlotFunction(const QObjectWithEnum::MyEnum value) const {
const auto ret = metaObject()->enumerator(0).valueToKey(int(value));
qDebug() << __FUNCTION__ << "returning:" << ret;
return ret;
}
void QObjectWithEnum::aSlot() {
qDebug() << __FUNCTION__ << "slot called";
emit someSignal("from aSlot");
}