diff options
Diffstat (limited to 'tools/designer/src/lib/shared/qdesigner_propertysheet.cpp')
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_propertysheet.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp index f4eb518..09d2a2f 100644 --- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp +++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp @@ -1202,6 +1202,12 @@ bool QDesignerPropertySheet::reset(int index) const QVariant classNameDefaultV = d->m_object->property("_q_classname"); if (classNameDefaultV.isValid()) value.setValue(classNameDefaultV.toString()); + } else if (!isAdditionalProperty(index)) { + const QDesignerMetaPropertyInterface *property = d->m_meta->property(index); + if ((property->accessFlags() & QDesignerMetaPropertyInterface::ResetAccess) && property->reset(d->m_object)) + value.setValue(property->read(d->m_object).toString()); + else + return false; } setProperty(index, QVariant::fromValue(value)); return true; |