summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
index fa8ecb0..b7cb680 100644
--- a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
+++ b/tools/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