diff --git a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp index 354943ff5ec1ed3bf16bcc8e61ade5424e626738..2917f586b72b420b25937acee0bec59bdc9f7f85 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp +++ b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp @@ -112,8 +112,9 @@ void QAxWidgetPropertySheet::setProperty(int index, const QVariant &value) } // Loading forms: Reload if (name == m_controlProperty) { - const qdesigner_internal::PropertySheetStringValue sv = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value); - const QString clsid = sv.value(); + const QString clsid = value.canConvert<qdesigner_internal::PropertySheetStringValue>() ? + qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value).value() : + value.toString(); if (clsid.isEmpty() || !axWidget()->loadControl(clsid)) reset(index); else