forked from eden-emu/eden
[cmake, qml] refactor: cmake reorg, match grid behavior to carousel
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
1604c102eb
commit
649d48c096
114 changed files with 867 additions and 865 deletions
22
src/Eden/Interface/MetaObjectHelper.h
Normal file
22
src/Eden/Interface/MetaObjectHelper.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef METAOBJECTHELPER_H
|
||||
#define METAOBJECTHELPER_H
|
||||
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QQmlProperty>
|
||||
|
||||
class MetaObjectHelper : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
QML_SINGLETON
|
||||
public:
|
||||
using QObject::QObject;
|
||||
Q_INVOKABLE QString typeName(QObject* object, const QString& property) const
|
||||
{
|
||||
QQmlProperty qmlProperty(object, property);
|
||||
QMetaProperty metaProperty = qmlProperty.property();
|
||||
return metaProperty.typeName();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // METAOBJECTHELPER_H
|
Loading…
Add table
Add a link
Reference in a new issue