12#include <QQmlProperty>
21inline bool targetHasActiveFocus(
const QQmlProperty& prop)
noexcept
23 auto* obj = prop.object();
27 const QVariant focus = obj->property(
"activeFocus");
28 return focus.typeId() == QMetaType::Bool && focus.toBool();
33inline bool writeBackUnlessEditing(QQmlProperty& prop,
const QVariant& value)
40 if(prop.read() == value)
43 if(targetHasActiveFocus(prop))