712int QDesignerPropertySheet::addDynamicProperty(
const QString &propName,
const QVariant &value)
714 using Info = QDesignerPropertySheetPrivate::Info;
715 if (!value.isValid())
717 if (!canAddDynamicProperty(propName))
721 switch (value.metaType().id()) {
722 case QMetaType::QIcon:
723 v = QVariant::fromValue(qdesigner_internal::PropertySheetIconValue());
725 case QMetaType::QPixmap:
726 v = QVariant::fromValue(qdesigner_internal::PropertySheetPixmapValue());
728 case QMetaType::QString:
729 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringValue(value.toString()));
731 case QMetaType::QStringList:
732 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue(value.toStringList()));
734 case QMetaType::QKeySequence: {
735 const QKeySequence keySequence = qvariant_cast<QKeySequence>(value);
736 v = QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue(keySequence));
741 if (d->m_addIndex.contains(propName)) {
742 const int idx = d->m_addIndex.value(propName);
744 setVisible(idx,
true);
745 d->m_addProperties.insert(idx, v);
746 setChanged(idx,
false);
747 const int index = d->m_meta->indexOfProperty(propName);
748 Info &info = d->ensureInfo(index);
749 info.defaultValue = value;
750 info.kind = QDesignerPropertySheetPrivate::DynamicProperty;
751 switch (value.metaType().id()) {
752 case QMetaType::QIcon:
753 case QMetaType::QPixmap:
754 d->addResourceProperty(idx, value.metaType().id());
756 case QMetaType::QString:
757 d->addStringProperty(idx);
759 case QMetaType::QKeySequence:
760 d->addKeySequenceProperty(idx);
766 const int index = count();
767 d->m_addIndex.insert(propName, index);
768 d->m_addProperties.insert(index, v);
769 Info &info = d->ensureInfo(index);
771 info.changed =
false;
772 info.defaultValue = value;
773 info.kind = QDesignerPropertySheetPrivate::DynamicProperty;
774 setPropertyGroup(index, tr(
"Dynamic Properties"));
775 switch (value.metaType().id()) {
776 case QMetaType::QIcon:
777 case QMetaType::QPixmap:
778 d->addResourceProperty(index, value.metaType().id());
780 case QMetaType::QString:
781 d->addStringProperty(index);
783 case QMetaType::QStringList:
784 d->addStringListProperty(index);
786 case QMetaType::QKeySequence:
787 d->addKeySequenceProperty(index);
804bool QDesignerPropertySheet::isDynamic(
int index)
const
806 if (!d->m_addProperties.contains(index))
809 switch (propertyType(index)) {
811 if (d->m_objectType == ObjectLabel)
814 case PropertyLayoutLeftMargin:
815 case PropertyLayoutTopMargin:
816 case PropertyLayoutRightMargin:
817 case PropertyLayoutBottomMargin:
818 case PropertyLayoutSpacing:
819 case PropertyLayoutHorizontalSpacing:
820 case PropertyLayoutVerticalSpacing:
821 case PropertyLayoutObjectName:
822#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
823 case PropertyLayoutSizeConstraint:
825 case PropertyLayoutHorizontalSizeConstraint:
826 case PropertyLayoutVerticalSizeConstraint:
828 case PropertyLayoutFieldGrowthPolicy:
829 case PropertyLayoutRowWrapPolicy:
830 case PropertyLayoutLabelAlignment:
831 case PropertyLayoutFormAlignment:
832 case PropertyLayoutBoxStretch:
833 case PropertyLayoutGridRowStretch:
834 case PropertyLayoutGridColumnStretch:
835 case PropertyLayoutGridRowMinimumHeight:
836 case PropertyLayoutGridColumnMinimumWidth:
837 if (d->m_object->isWidgetType() && d->m_canHaveLayoutAttributes)
892int QDesignerPropertySheet::createFakeProperty(
const QString &propertyName,
const QVariant &value)
894 using Info = QDesignerPropertySheetPrivate::Info;
896 const int index = d->m_meta->indexOfProperty(propertyName);
898 if (!(d->m_meta->property(index)->attributes() & QDesignerMetaPropertyInterface::DesignableAttribute))
900 Info &info = d->ensureInfo(index);
901 info.visible =
false;
902 info.kind = QDesignerPropertySheetPrivate::FakeProperty;
903 QVariant v = value.isValid() ? value : metaProperty(index);
904 switch (v.metaType().id()) {
905 case QMetaType::QString:
906 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringValue());
908 case QMetaType::QStringList:
909 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue());
911 case QMetaType::QKeySequence:
912 v = QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue());
915 d->m_fakeProperties.insert(index, v);
918 if (!value.isValid())
921 const int newIndex = count();
922 d->m_addIndex.insert(propertyName, newIndex);
923 d->m_addProperties.insert(newIndex, value);
924 Info &info = d->ensureInfo(newIndex);
925 info.propertyType = propertyTypeFromName(propertyName);
926 info.kind = QDesignerPropertySheetPrivate::FakeProperty;
1007QVariant QDesignerPropertySheet::property(
int index)
const
1009 if (d->invalidIndex(Q_FUNC_INFO, index))
1011 if (isAdditionalProperty(index)) {
1012 if (isFakeLayoutProperty(index)) {
1013 QDesignerPropertySheetExtension *layoutPropertySheet;
1014 if (d->layout(&layoutPropertySheet) && layoutPropertySheet) {
1015 const QString newPropName = d->transformLayoutPropertyName(index);
1016 if (!newPropName.isEmpty()) {
1017 const int newIndex = layoutPropertySheet->indexOf(newPropName);
1019 return layoutPropertySheet->property(newIndex);
1024 return d->m_addProperties.value(index);
1027 if (isFakeProperty(index)) {
1028 return d->m_fakeProperties.value(index);
1031 if (d->isResourceProperty(index))
1032 return d->resourceProperty(index);
1034 if (d->isStringProperty(index)) {
1035 QString strValue = metaProperty(index).toString();
1036 qdesigner_internal::PropertySheetStringValue value = d->stringProperty(index);
1037 if (strValue != value.value()) {
1038 value.setValue(strValue);
1039 d->setStringProperty(index, value);
1041 return QVariant::fromValue(value);
1044 if (d->isStringListProperty(index)) {
1045 const QStringList listValue = metaProperty(index).toStringList();
1046 qdesigner_internal::PropertySheetStringListValue value = d->stringListProperty(index);
1047 if (listValue != value.value()) {
1048 value.setValue(listValue);
1049 d->setStringListProperty(index, value);
1051 return QVariant::fromValue(value);
1054 if (d->isKeySequenceProperty(index)) {
1055 QKeySequence keyValue = qvariant_cast<QKeySequence>(metaProperty(index));
1056 qdesigner_internal::PropertySheetKeySequenceValue value = d->keySequenceProperty(index);
1057 if (keyValue != value.value()) {
1058 value.setValue(keyValue);
1059 d->setKeySequenceProperty(index, value);
1061 return QVariant::fromValue(value);
1064 QVariant result = metaProperty(index);
1069 if (result.typeId() == QMetaType::Bool && !result.toBool()
1070 && d->m_object->isWidgetType()
1071 && propertyType(index) == PropertyVisible) {
1072 if (
auto *hv = qobject_cast<QHeaderView *>(d->m_object)) {
1073 if (
auto *parent = hv->parentWidget()) {
1074 if (!parent->isVisible())
1075 result = QVariant(!hv->testAttribute(Qt::WA_WState_Hidden));
1105QVariant QDesignerPropertySheet::resolvePropertyValue(
int index,
const QVariant &value)
const
1107 if (value.canConvert<qdesigner_internal::PropertySheetEnumValue>())
1108 return qvariant_cast<qdesigner_internal::PropertySheetEnumValue>(value).value;
1110 if (value.canConvert<qdesigner_internal::PropertySheetFlagValue>())
1111 return qvariant_cast<qdesigner_internal::PropertySheetFlagValue>(value).value;
1113 if (value.canConvert<qdesigner_internal::PropertySheetStringValue>())
1114 return qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value).value();
1116 if (value.canConvert<qdesigner_internal::PropertySheetStringListValue>())
1117 return qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value).value();
1119 if (value.canConvert<qdesigner_internal::PropertySheetKeySequenceValue>())
1120 return QVariant::fromValue(qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value).value());
1122 if (value.canConvert<qdesigner_internal::PropertySheetPixmapValue>()) {
1123 const QString path = qvariant_cast<qdesigner_internal::PropertySheetPixmapValue>(value).path();
1125 return defaultResourceProperty(index);
1126 if (d->m_pixmapCache) {
1127 return d->m_pixmapCache->pixmap(qvariant_cast<qdesigner_internal::PropertySheetPixmapValue>(value));
1131 if (value.canConvert<qdesigner_internal::PropertySheetIconValue>()) {
1132 const unsigned mask = qvariant_cast<qdesigner_internal::PropertySheetIconValue>(value).mask();
1134 return defaultResourceProperty(index);
1136 return d->m_iconCache->icon(qvariant_cast<qdesigner_internal::PropertySheetIconValue>(value));
1179void QDesignerPropertySheet::setProperty(
int index,
const QVariant &value)
1181 if (d->invalidIndex(Q_FUNC_INFO, index))
1183 if (isAdditionalProperty(index)) {
1184 if (d->m_objectType == ObjectLabel && propertyType(index) == PropertyBuddy) {
1185 QFormBuilderExtra::applyBuddy(value.toString(), QFormBuilderExtra::BuddyApplyVisibleOnly, qobject_cast<QLabel *>(d->m_object));
1186 d->m_addProperties[index] = toByteArray(value);
1190 if (isFakeLayoutProperty(index)) {
1191 QDesignerPropertySheetExtension *layoutPropertySheet;
1192 if (d->layout(&layoutPropertySheet) && layoutPropertySheet) {
1193 const QString newPropName = d->transformLayoutPropertyName(index);
1194 if (!newPropName.isEmpty()) {
1195 const int newIndex = layoutPropertySheet->indexOf(newPropName);
1197 layoutPropertySheet->setProperty(newIndex, value);
1202 if (isDynamicProperty(index) || isDefaultDynamicProperty(index)) {
1203 if (d->isResourceProperty(index))
1204 d->setResourceProperty(index, value);
1205 if (d->isStringProperty(index))
1206 d->setStringProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value));
1207 if (d->isStringListProperty(index))
1208 d->setStringListProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value));
1209 if (d->isKeySequenceProperty(index))
1210 d->setKeySequenceProperty(index, qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value));
1211 d->m_object->setProperty(propertyName(index).toUtf8().constData(),
1212 resolvePropertyValue(index, value));
1213 if (d->m_object->isWidgetType()) {
1214 QWidget *w = qobject_cast<QWidget *>(d->m_object);
1215 w->setStyleSheet(w->styleSheet());
1218 d->m_addProperties[index] = value;
1219 }
else if (isFakeProperty(index)) {
1220 setFakeProperty(index, value);
1222 if (d->isResourceProperty(index))
1223 d->setResourceProperty(index, value);
1224 if (d->isStringProperty(index))
1225 d->setStringProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value));
1226 if (d->isStringListProperty(index))
1227 d->setStringListProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value));
1228 if (d->isKeySequenceProperty(index))
1229 d->setKeySequenceProperty(index, qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value));
1230 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1231 p->write(d->m_object, resolvePropertyValue(index, value));
1232 if (qobject_cast<QGroupBox *>(d->m_object) && propertyType(index) == PropertyCheckable) {
1233 const int idx = indexOf(u"focusPolicy"_s);
1234 if (!isChanged(idx)) {
1235 qdesigner_internal::PropertySheetEnumValue e = qvariant_cast<qdesigner_internal::PropertySheetEnumValue>(property(idx));
1236 if (value.toBool()) {
1237 const QDesignerMetaPropertyInterface *p = d->m_meta->property(idx);
1238 p->write(d->m_object, Qt::NoFocus);
1239 e.value = Qt::StrongFocus;
1242 setFakeProperty(idx, v);
1244 e.value = Qt::NoFocus;
1247 setFakeProperty(idx, v);
1263bool QDesignerPropertySheet::reset(
int index)
1265 if (d->invalidIndex(Q_FUNC_INFO, index))
1267 if (d->isStringProperty(index)) {
1268 qdesigner_internal::PropertySheetStringValue value;
1270 if (propertyName(index) ==
"objectName"_L1) {
1271 const QVariant classNameDefaultV = d->m_object->property(
"_q_classname");
1272 if (classNameDefaultV.isValid())
1273 value.setValue(classNameDefaultV.toString());
1274 }
else if (!isAdditionalProperty(index)) {
1275 const QDesignerMetaPropertyInterface *property = d->m_meta->property(index);
1276 if ((property->accessFlags() & QDesignerMetaPropertyInterface::ResetAccess) && property->reset(d->m_object))
1277 value.setValue(property->read(d->m_object).toString());
1281 setProperty(index, QVariant::fromValue(value));
1284 if (d->isStringListProperty(index))
1285 setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue()));
1286 if (d->isKeySequenceProperty(index))
1287 setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue()));
1288 if (d->isResourceProperty(index)) {
1289 setProperty(index, d->emptyResourceProperty(index));
1292 if (isDynamic(index)) {
1293 const QString propName = propertyName(index);
1294 const QVariant oldValue = d->m_addProperties.value(index);
1295 const QVariant defaultValue = d->m_info.value(index).defaultValue;
1296 QVariant newValue = defaultValue;
1297 if (d->isStringProperty(index)) {
1298 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetStringValue(newValue.toString()));
1299 }
else if (d->isStringListProperty(index)) {
1300 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue(newValue.toStringList()));
1301 }
else if (d->isKeySequenceProperty(index)) {
1302 const QKeySequence keySequence = qvariant_cast<QKeySequence>(newValue);
1303 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue(keySequence));
1305 if (oldValue == newValue)
1307 d->m_object->setProperty(propName.toUtf8().constData(), defaultValue);
1308 d->m_addProperties[index] = newValue;
1310 }
else if (!d->m_info.value(index).defaultValue.isNull()) {
1311 setProperty(index, d->m_info.value(index).defaultValue);
1314 if (isAdditionalProperty(index)) {
1315 const PropertyType pType = propertyType(index);
1316 if (d->m_objectType == ObjectLabel && pType == PropertyBuddy) {
1317 setProperty(index, QVariant(QByteArray()));
1320 if (isFakeLayoutProperty(index)) {
1323 case PropertyLayoutObjectName:
1324 setProperty(index, QString());
1326#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
1327 case PropertyLayoutSizeConstraint:
1329 case PropertyLayoutHorizontalSizeConstraint:
1330 case PropertyLayoutVerticalSizeConstraint:
1332 setProperty(index, QVariant(QLayout::SetDefaultConstraint));
1334 case PropertyLayoutBoxStretch:
1335 case PropertyLayoutGridRowStretch:
1336 case PropertyLayoutGridColumnStretch:
1337 case PropertyLayoutGridRowMinimumHeight:
1338 case PropertyLayoutGridColumnMinimumWidth:
1339 case PropertyLayoutFieldGrowthPolicy:
1340 case PropertyLayoutRowWrapPolicy:
1341 case PropertyLayoutLabelAlignment:
1342 case PropertyLayoutFormAlignment: {
1343 QDesignerPropertySheetExtension *layoutPropertySheet;
1344 if (d->layout(&layoutPropertySheet) && layoutPropertySheet)
1345 return layoutPropertySheet->reset(layoutPropertySheet->indexOf(d->transformLayoutPropertyName(index)));
1353 switch (d->m_objectType) {
1354 case ObjectLayoutWidget:
1355 if (pType == PropertyLayoutLeftMargin ||
1356 pType == PropertyLayoutTopMargin ||
1357 pType == PropertyLayoutRightMargin ||
1358 pType == PropertyLayoutBottomMargin)
1364 setProperty(index, value);
1369 if (isFakeProperty(index)) {
1370 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1371 const bool result = p->reset(d->m_object);
1372 d->m_fakeProperties[index] = p->read(d->m_object);
1375 if (propertyType(index) == PropertyGeometry && d->m_object->isWidgetType()) {
1376 if (QWidget *w = qobject_cast<QWidget*>(d->m_object)) {
1377 QWidget *widget = w;
1378 if (qdesigner_internal::Utils::isCentralWidget(d->m_fwb, widget) && d->m_fwb->parentWidget())
1379 widget = d->m_fwb->parentWidget();
1381 if (widget != w && widget->parentWidget()) {
1382 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
1383 widget->parentWidget()->adjustSize();
1385 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
1386 widget->adjustSize();
1392 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1393 return p->reset(d->m_object);
1417void QDesignerPropertySheet::setChanged(
int index,
bool changed)
1419 if (d->invalidIndex(Q_FUNC_INFO, index))
1421 if (isAdditionalProperty(index)) {
1422 if (isFakeLayoutProperty(index)) {
1423 QDesignerPropertySheetExtension *layoutPropertySheet;
1424 if (d->layout(&layoutPropertySheet) && layoutPropertySheet) {
1425 const QString newPropName = d->transformLayoutPropertyName(index);
1426 if (!newPropName.isEmpty()) {
1427 const int newIndex = layoutPropertySheet->indexOf(newPropName);
1429 layoutPropertySheet->setChanged(newIndex, changed);
1434 if (d->isReloadableProperty(index)) {
1437 d->m_fwb->addReloadableProperty(
this, index);
1439 d->m_fwb->removeReloadableProperty(
this, index);
1442 d->ensureInfo(index).changed = changed;
1445bool QDesignerPropertySheet::isFakeLayoutProperty(
int index)
const
1447 if (!isAdditionalProperty(index))
1450 switch (propertyType(index)) {
1451 case PropertyLayoutObjectName:
1452#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
1453 case PropertyLayoutSizeConstraint:
1455 case PropertyLayoutHorizontalSizeConstraint:
1456 case PropertyLayoutVerticalSizeConstraint:
1459 case PropertyLayoutLeftMargin:
1460 case PropertyLayoutTopMargin:
1461 case PropertyLayoutRightMargin:
1462 case PropertyLayoutBottomMargin:
1463 case PropertyLayoutSpacing:
1464 case PropertyLayoutHorizontalSpacing:
1465 case PropertyLayoutVerticalSpacing:
1466 case PropertyLayoutFieldGrowthPolicy:
1467 case PropertyLayoutRowWrapPolicy:
1468 case PropertyLayoutLabelAlignment:
1469 case PropertyLayoutFormAlignment:
1470 case PropertyLayoutBoxStretch:
1471 case PropertyLayoutGridRowStretch:
1472 case PropertyLayoutGridColumnStretch:
1473 case PropertyLayoutGridRowMinimumHeight:
1474 case PropertyLayoutGridColumnMinimumWidth:
1475 return d->m_canHaveLayoutAttributes;
1490bool QDesignerPropertySheet::isVisible(
int index)
const
1492 if (d->invalidIndex(Q_FUNC_INFO, index))
1495 const PropertyType type = propertyType(index);
1496 if (isAdditionalProperty(index)) {
1497 if (isFakeLayoutProperty(index) && d->m_object->isWidgetType()) {
1498 const QLayout *currentLayout = d->layout();
1501 const int visibleMask = qdesigner_internal::LayoutProperties::visibleProperties(currentLayout);
1503 case PropertyLayoutSpacing:
1504 return visibleMask & qdesigner_internal::LayoutProperties::SpacingProperty;
1505 case PropertyLayoutHorizontalSpacing:
1506 case PropertyLayoutVerticalSpacing:
1507 return visibleMask & qdesigner_internal::LayoutProperties::HorizSpacingProperty;
1508 case PropertyLayoutFieldGrowthPolicy:
1509 return visibleMask & qdesigner_internal::LayoutProperties::FieldGrowthPolicyProperty;
1510 case PropertyLayoutRowWrapPolicy:
1511 return visibleMask & qdesigner_internal::LayoutProperties::RowWrapPolicyProperty;
1512 case PropertyLayoutLabelAlignment:
1513 return visibleMask & qdesigner_internal::LayoutProperties::LabelAlignmentProperty;
1514 case PropertyLayoutFormAlignment:
1515 return visibleMask & qdesigner_internal::LayoutProperties::FormAlignmentProperty;
1516 case PropertyLayoutBoxStretch:
1517 return visibleMask & qdesigner_internal::LayoutProperties::BoxStretchProperty;
1518 case PropertyLayoutGridRowStretch:
1519 return visibleMask & qdesigner_internal::LayoutProperties::GridRowStretchProperty;
1520 case PropertyLayoutGridColumnStretch:
1521 return visibleMask & qdesigner_internal::LayoutProperties::GridColumnStretchProperty;
1522 case PropertyLayoutGridRowMinimumHeight:
1523 return visibleMask & qdesigner_internal::LayoutProperties::GridRowMinimumHeightProperty;
1524 case PropertyLayoutGridColumnMinimumWidth:
1525 return visibleMask & qdesigner_internal::LayoutProperties::GridColumnMinimumWidthProperty;
1531 return d->m_info.value(index).visible;
1534 if (isFakeProperty(index)) {
1536 case PropertyWindowModality:
1537 case PropertyWindowOpacity:
1538 return d->m_info.value(index).visible;
1545 const bool visible = d->m_info.value(index).visible;
1547 case PropertyWindowTitle:
1548 case PropertyWindowIcon:
1549 case PropertyWindowFilePath:
1550 case PropertyWindowOpacity:
1551 case PropertyWindowIconText:
1552 case PropertyWindowModified:
1560 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1561 if (!(p->accessFlags() & QDesignerMetaPropertyInterface::WriteAccess))
1564 return p->attributes().testFlag(QDesignerMetaPropertyInterface::DesignableAttribute);
1574bool QDesignerPropertySheet::isEnabled(
int index)
const
1576 if (d->invalidIndex(Q_FUNC_INFO, index))
1578 if (isAdditionalProperty(index))
1581 if (isFakeProperty(index))
1585 if (propertyType(index) == PropertyGeometry && d->m_object->isWidgetType()) {
1587 const qdesigner_internal::LayoutInfo::Type lt = qdesigner_internal::LayoutInfo::laidoutWidgetType(d->m_core, qobject_cast<QWidget *>(d->m_object), &isManaged);
1588 return !isManaged || lt == qdesigner_internal::LayoutInfo::NoLayout;
1591 if (d->m_info.value(index).visible)
1596 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1597 if (!p->accessFlags().testFlag(QDesignerMetaPropertyInterface::WriteAccess))
1600 const PropertyType type = propertyType(index);
1601 if (type == PropertyChecked && d->m_objectFlags.testFlag(CheckableProperty))
1602 return d->m_object->property(
"checkable").toBool();
1685QObject *QDesignerAbstractPropertySheetFactory::extension(QObject *object,
const QString &iid)
const
1690 if (iid != m_impl->m_propertySheetId && iid != m_impl->m_dynamicPropertySheetId)
1693 QObject *ext = m_impl->m_extensions.value(object, 0);
1694 if (!ext && (ext = createPropertySheet(object,
const_cast<QDesignerAbstractPropertySheetFactory*>(
this)))) {
1695 connect(ext, &QObject::destroyed,
this, &QDesignerAbstractPropertySheetFactory::objectDestroyed);
1696 connect(object, &QObject::destroyed,
this, &QDesignerAbstractPropertySheetFactory::objectDestroyed);
1697 m_impl->m_extensions.insert(object, ext);