Revision fa408e04
Von Christian Ehringfeld vor mehr als 9 Jahren hinzugefügt
- ID fa408e042c3e347cea466ab3488e63f81ec3300d
- Vorgänger 63d91df4
| src/entityhelper.h | ||
|---|---|---|
|
static void setListProperty(const QSharedPointer<Entity> &entity,
|
||
|
QList<QSharedPointer<Entity>> &list,
|
||
|
const QMetaProperty &property);
|
||
|
template<class T>
|
||
|
static void writeListProperty(const QSharedPointer<Entity> &entity, QVariant data, const QMetaProperty &property,T object) {
|
||
|
Q_UNUSED(object)
|
||
|
QVariant variant;
|
||
|
T *t = new T();
|
||
|
|
||
|
QList<QSharedPointer<T>> li;
|
||
|
//variant = qVariantFromValue(li);
|
||
|
|
||
|
//auto list = *reinterpret_cast<QList<QSharedPointer<T>>*>(data.data());
|
||
|
|
||
|
//variant.setValue<QList<QSharedPointer<T>>>(list);
|
||
|
// property.write(entity.data(),variant);
|
||
|
}
|
||
|
|
||
|
static void setProperty(const QSharedPointer<Entity> &entity,
|
||
|
QSharedPointer<Entity> value,
|
||
|
const QMetaProperty &property);
|
||
Auch abrufbar als: Unified diff
tried something