711int QDesignerPropertySheet::addDynamicProperty(
const QString &propName,
const QVariant &value)
713 using Info = QDesignerPropertySheetPrivate::Info;
714 if (!value.isValid())
716 if (!canAddDynamicProperty(propName))
720 switch (value.metaType().id()) {
721 case QMetaType::QIcon:
722 v = QVariant::fromValue(qdesigner_internal::PropertySheetIconValue());
724 case QMetaType::QPixmap:
725 v = QVariant::fromValue(qdesigner_internal::PropertySheetPixmapValue());
727 case QMetaType::QString:
728 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringValue(value.toString()));
730 case QMetaType::QStringList:
731 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue(value.toStringList()));
733 case QMetaType::QKeySequence: {
734 const QKeySequence keySequence = qvariant_cast<QKeySequence>(value);
735 v = QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue(keySequence));
740 if (d->m_addIndex.contains(propName)) {
741 const int idx = d->m_addIndex.value(propName);
743 setVisible(idx,
true);
744 d->m_addProperties.insert(idx, v);
745 setChanged(idx,
false);
746 const int index = d->m_meta->indexOfProperty(propName);
747 Info &info = d->ensureInfo(index);
748 info.defaultValue = value;
749 info.kind = QDesignerPropertySheetPrivate::DynamicProperty;
750 switch (value.metaType().id()) {
751 case QMetaType::QIcon:
752 case QMetaType::QPixmap:
753 d->addResourceProperty(idx, value.metaType().id());
755 case QMetaType::QString:
756 d->addStringProperty(idx);
758 case QMetaType::QKeySequence:
759 d->addKeySequenceProperty(idx);
765 const int index = count();
766 d->m_addIndex.insert(propName, index);
767 d->m_addProperties.insert(index, v);
768 Info &info = d->ensureInfo(index);
770 info.changed =
false;
771 info.defaultValue = value;
772 info.kind = QDesignerPropertySheetPrivate::DynamicProperty;
773 setPropertyGroup(index, tr(
"Dynamic Properties"));
774 switch (value.metaType().id()) {
775 case QMetaType::QIcon:
776 case QMetaType::QPixmap:
777 d->addResourceProperty(index, value.metaType().id());
779 case QMetaType::QString:
780 d->addStringProperty(index);
782 case QMetaType::QStringList:
783 d->addStringListProperty(index);
785 case QMetaType::QKeySequence:
786 d->addKeySequenceProperty(index);
803bool QDesignerPropertySheet::isDynamic(
int index)
const
805 if (!d->m_addProperties.contains(index))
808 switch (propertyType(index)) {
810 if (d->m_objectType == ObjectLabel)
813 case PropertyLayoutLeftMargin:
814 case PropertyLayoutTopMargin:
815 case PropertyLayoutRightMargin:
816 case PropertyLayoutBottomMargin:
817 case PropertyLayoutSpacing:
818 case PropertyLayoutHorizontalSpacing:
819 case PropertyLayoutVerticalSpacing:
820 case PropertyLayoutObjectName:
821#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
822 case PropertyLayoutSizeConstraint:
824 case PropertyLayoutHorizontalSizeConstraint:
825 case PropertyLayoutVerticalSizeConstraint:
827 case PropertyLayoutFieldGrowthPolicy:
828 case PropertyLayoutRowWrapPolicy:
829 case PropertyLayoutLabelAlignment:
830 case PropertyLayoutFormAlignment:
831 case PropertyLayoutBoxStretch:
832 case PropertyLayoutGridRowStretch:
833 case PropertyLayoutGridColumnStretch:
834 case PropertyLayoutGridRowMinimumHeight:
835 case PropertyLayoutGridColumnMinimumWidth:
836 if (d->m_object->isWidgetType() && d->m_canHaveLayoutAttributes)
891int QDesignerPropertySheet::createFakeProperty(
const QString &propertyName,
const QVariant &value)
893 using Info = QDesignerPropertySheetPrivate::Info;
895 const int index = d->m_meta->indexOfProperty(propertyName);
897 if (!(d->m_meta->property(index)->attributes() & QDesignerMetaPropertyInterface::DesignableAttribute))
899 Info &info = d->ensureInfo(index);
900 info.visible =
false;
901 info.kind = QDesignerPropertySheetPrivate::FakeProperty;
902 QVariant v = value.isValid() ? value : metaProperty(index);
903 switch (v.metaType().id()) {
904 case QMetaType::QString:
905 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringValue());
907 case QMetaType::QStringList:
908 v = QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue());
910 case QMetaType::QKeySequence:
911 v = QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue());
914 d->m_fakeProperties.insert(index, v);
917 if (!value.isValid())
920 const int newIndex = count();
921 d->m_addIndex.insert(propertyName, newIndex);
922 d->m_addProperties.insert(newIndex, value);
923 Info &info = d->ensureInfo(newIndex);
924 info.propertyType = propertyTypeFromName(propertyName);
925 info.kind = QDesignerPropertySheetPrivate::FakeProperty;
1006QVariant QDesignerPropertySheet::property(
int index)
const
1008 if (d->invalidIndex(Q_FUNC_INFO, index))
1010 if (isAdditionalProperty(index)) {
1011 if (isFakeLayoutProperty(index)) {
1012 QDesignerPropertySheetExtension *layoutPropertySheet;
1013 if (d->layout(&layoutPropertySheet) && layoutPropertySheet) {
1014 const QString newPropName = d->transformLayoutPropertyName(index);
1015 if (!newPropName.isEmpty()) {
1016 const int newIndex = layoutPropertySheet->indexOf(newPropName);
1018 return layoutPropertySheet->property(newIndex);
1023 return d->m_addProperties.value(index);
1026 if (isFakeProperty(index)) {
1027 return d->m_fakeProperties.value(index);
1030 if (d->isResourceProperty(index))
1031 return d->resourceProperty(index);
1033 if (d->isStringProperty(index)) {
1034 QString strValue = metaProperty(index).toString();
1035 qdesigner_internal::PropertySheetStringValue value = d->stringProperty(index);
1036 if (strValue != value.value()) {
1037 value.setValue(strValue);
1038 d->setStringProperty(index, value);
1040 return QVariant::fromValue(value);
1043 if (d->isStringListProperty(index)) {
1044 const QStringList listValue = metaProperty(index).toStringList();
1045 qdesigner_internal::PropertySheetStringListValue value = d->stringListProperty(index);
1046 if (listValue != value.value()) {
1047 value.setValue(listValue);
1048 d->setStringListProperty(index, value);
1050 return QVariant::fromValue(value);
1053 if (d->isKeySequenceProperty(index)) {
1054 QKeySequence keyValue = qvariant_cast<QKeySequence>(metaProperty(index));
1055 qdesigner_internal::PropertySheetKeySequenceValue value = d->keySequenceProperty(index);
1056 if (keyValue != value.value()) {
1057 value.setValue(keyValue);
1058 d->setKeySequenceProperty(index, value);
1060 return QVariant::fromValue(value);
1063 QVariant result = metaProperty(index);
1068 if (result.typeId() == QMetaType::Bool && !result.toBool()
1069 && d->m_object->isWidgetType()
1070 && propertyType(index) == PropertyVisible) {
1071 if (
auto *hv = qobject_cast<QHeaderView *>(d->m_object)) {
1072 if (
auto *parent = hv->parentWidget()) {
1073 if (!parent->isVisible())
1074 result = QVariant(!hv->testAttribute(Qt::WA_WState_Hidden));
1104QVariant QDesignerPropertySheet::resolvePropertyValue(
int index,
const QVariant &value)
const
1106 if (value.canConvert<qdesigner_internal::PropertySheetEnumValue>())
1107 return qvariant_cast<qdesigner_internal::PropertySheetEnumValue>(value).value;
1109 if (value.canConvert<qdesigner_internal::PropertySheetFlagValue>())
1110 return qvariant_cast<qdesigner_internal::PropertySheetFlagValue>(value).value;
1112 if (value.canConvert<qdesigner_internal::PropertySheetStringValue>())
1113 return qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value).value();
1115 if (value.canConvert<qdesigner_internal::PropertySheetStringListValue>())
1116 return qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value).value();
1118 if (value.canConvert<qdesigner_internal::PropertySheetKeySequenceValue>())
1119 return QVariant::fromValue(qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value).value());
1121 if (value.canConvert<qdesigner_internal::PropertySheetPixmapValue>()) {
1122 const QString path = qvariant_cast<qdesigner_internal::PropertySheetPixmapValue>(value).path();
1124 return defaultResourceProperty(index);
1125 if (d->m_pixmapCache) {
1126 return d->m_pixmapCache->pixmap(qvariant_cast<qdesigner_internal::PropertySheetPixmapValue>(value));
1130 if (value.canConvert<qdesigner_internal::PropertySheetIconValue>()) {
1131 const unsigned mask = qvariant_cast<qdesigner_internal::PropertySheetIconValue>(value).mask();
1133 return defaultResourceProperty(index);
1135 return d->m_iconCache->icon(qvariant_cast<qdesigner_internal::PropertySheetIconValue>(value));
1178void QDesignerPropertySheet::setProperty(
int index,
const QVariant &value)
1180 if (d->invalidIndex(Q_FUNC_INFO, index))
1182 if (isAdditionalProperty(index)) {
1183 if (d->m_objectType == ObjectLabel && propertyType(index) == PropertyBuddy) {
1184 QFormBuilderExtra::applyBuddy(value.toString(), QFormBuilderExtra::BuddyApplyVisibleOnly, qobject_cast<QLabel *>(d->m_object));
1185 d->m_addProperties[index] = toByteArray(value);
1189 if (isFakeLayoutProperty(index)) {
1190 QDesignerPropertySheetExtension *layoutPropertySheet;
1191 if (d->layout(&layoutPropertySheet) && layoutPropertySheet) {
1192 const QString newPropName = d->transformLayoutPropertyName(index);
1193 if (!newPropName.isEmpty()) {
1194 const int newIndex = layoutPropertySheet->indexOf(newPropName);
1196 layoutPropertySheet->setProperty(newIndex, value);
1201 if (isDynamicProperty(index) || isDefaultDynamicProperty(index)) {
1202 if (d->isResourceProperty(index))
1203 d->setResourceProperty(index, value);
1204 if (d->isStringProperty(index))
1205 d->setStringProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value));
1206 if (d->isStringListProperty(index))
1207 d->setStringListProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value));
1208 if (d->isKeySequenceProperty(index))
1209 d->setKeySequenceProperty(index, qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value));
1210 d->m_object->setProperty(propertyName(index).toUtf8().constData(),
1211 resolvePropertyValue(index, value));
1212 if (d->m_object->isWidgetType()) {
1213 QWidget *w = qobject_cast<QWidget *>(d->m_object);
1214 w->setStyleSheet(w->styleSheet());
1217 d->m_addProperties[index] = value;
1218 }
else if (isFakeProperty(index)) {
1219 setFakeProperty(index, value);
1221 if (d->isResourceProperty(index))
1222 d->setResourceProperty(index, value);
1223 if (d->isStringProperty(index))
1224 d->setStringProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value));
1225 if (d->isStringListProperty(index))
1226 d->setStringListProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value));
1227 if (d->isKeySequenceProperty(index))
1228 d->setKeySequenceProperty(index, qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value));
1229 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1230 p->write(d->m_object, resolvePropertyValue(index, value));
1231 if (qobject_cast<QGroupBox *>(d->m_object) && propertyType(index) == PropertyCheckable) {
1232 const int idx = indexOf(u"focusPolicy"_s);
1233 if (!isChanged(idx)) {
1234 qdesigner_internal::PropertySheetEnumValue e = qvariant_cast<qdesigner_internal::PropertySheetEnumValue>(property(idx));
1235 if (value.toBool()) {
1236 const QDesignerMetaPropertyInterface *p = d->m_meta->property(idx);
1237 p->write(d->m_object, Qt::NoFocus);
1238 e.value = Qt::StrongFocus;
1241 setFakeProperty(idx, v);
1243 e.value = Qt::NoFocus;
1246 setFakeProperty(idx, v);
1262bool QDesignerPropertySheet::reset(
int index)
1264 if (d->invalidIndex(Q_FUNC_INFO, index))
1266 if (d->isStringProperty(index)) {
1267 qdesigner_internal::PropertySheetStringValue value;
1269 if (propertyName(index) ==
"objectName"_L1) {
1270 const QVariant classNameDefaultV = d->m_object->property(
"_q_classname");
1271 if (classNameDefaultV.isValid())
1272 value.setValue(classNameDefaultV.toString());
1273 }
else if (!isAdditionalProperty(index)) {
1274 const QDesignerMetaPropertyInterface *property = d->m_meta->property(index);
1275 if ((property->accessFlags() & QDesignerMetaPropertyInterface::ResetAccess) && property->reset(d->m_object))
1276 value.setValue(property->read(d->m_object).toString());
1280 setProperty(index, QVariant::fromValue(value));
1283 if (d->isStringListProperty(index))
1284 setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue()));
1285 if (d->isKeySequenceProperty(index))
1286 setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue()));
1287 if (d->isResourceProperty(index)) {
1288 setProperty(index, d->emptyResourceProperty(index));
1291 if (isDynamic(index)) {
1292 const QString propName = propertyName(index);
1293 const QVariant oldValue = d->m_addProperties.value(index);
1294 const QVariant defaultValue = d->m_info.value(index).defaultValue;
1295 QVariant newValue = defaultValue;
1296 if (d->isStringProperty(index)) {
1297 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetStringValue(newValue.toString()));
1298 }
else if (d->isStringListProperty(index)) {
1299 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue(newValue.toStringList()));
1300 }
else if (d->isKeySequenceProperty(index)) {
1301 const QKeySequence keySequence = qvariant_cast<QKeySequence>(newValue);
1302 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue(keySequence));
1304 if (oldValue == newValue)
1306 d->m_object->setProperty(propName.toUtf8().constData(), defaultValue);
1307 d->m_addProperties[index] = newValue;
1309 }
else if (!d->m_info.value(index).defaultValue.isNull()) {
1310 setProperty(index, d->m_info.value(index).defaultValue);
1313 if (isAdditionalProperty(index)) {
1314 const PropertyType pType = propertyType(index);
1315 if (d->m_objectType == ObjectLabel && pType == PropertyBuddy) {
1316 setProperty(index, QVariant(QByteArray()));
1319 if (isFakeLayoutProperty(index)) {
1322 case PropertyLayoutObjectName:
1323 setProperty(index, QString());
1325#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
1326 case PropertyLayoutSizeConstraint:
1328 case PropertyLayoutHorizontalSizeConstraint:
1329 case PropertyLayoutVerticalSizeConstraint:
1331 setProperty(index, QVariant(QLayout::SetDefaultConstraint));
1333 case PropertyLayoutBoxStretch:
1334 case PropertyLayoutGridRowStretch:
1335 case PropertyLayoutGridColumnStretch:
1336 case PropertyLayoutGridRowMinimumHeight:
1337 case PropertyLayoutGridColumnMinimumWidth:
1338 case PropertyLayoutFieldGrowthPolicy:
1339 case PropertyLayoutRowWrapPolicy:
1340 case PropertyLayoutLabelAlignment:
1341 case PropertyLayoutFormAlignment: {
1342 QDesignerPropertySheetExtension *layoutPropertySheet;
1343 if (d->layout(&layoutPropertySheet) && layoutPropertySheet)
1344 return layoutPropertySheet->reset(layoutPropertySheet->indexOf(d->transformLayoutPropertyName(index)));
1352 switch (d->m_objectType) {
1353 case ObjectLayoutWidget:
1354 if (pType == PropertyLayoutLeftMargin ||
1355 pType == PropertyLayoutTopMargin ||
1356 pType == PropertyLayoutRightMargin ||
1357 pType == PropertyLayoutBottomMargin)
1363 setProperty(index, value);
1368 if (isFakeProperty(index)) {
1369 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1370 const bool result = p->reset(d->m_object);
1371 d->m_fakeProperties[index] = p->read(d->m_object);
1374 if (propertyType(index) == PropertyGeometry && d->m_object->isWidgetType()) {
1375 if (QWidget *w = qobject_cast<QWidget*>(d->m_object)) {
1376 QWidget *widget = w;
1377 if (qdesigner_internal::Utils::isCentralWidget(d->m_fwb, widget) && d->m_fwb->parentWidget())
1378 widget = d->m_fwb->parentWidget();
1380 if (widget != w && widget->parentWidget()) {
1381 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
1382 widget->parentWidget()->adjustSize();
1384 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
1385 widget->adjustSize();
1391 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1392 return p->reset(d->m_object);
1416void QDesignerPropertySheet::setChanged(
int index,
bool changed)
1418 if (d->invalidIndex(Q_FUNC_INFO, index))
1420 if (isAdditionalProperty(index)) {
1421 if (isFakeLayoutProperty(index)) {
1422 QDesignerPropertySheetExtension *layoutPropertySheet;
1423 if (d->layout(&layoutPropertySheet) && layoutPropertySheet) {
1424 const QString newPropName = d->transformLayoutPropertyName(index);
1425 if (!newPropName.isEmpty()) {
1426 const int newIndex = layoutPropertySheet->indexOf(newPropName);
1428 layoutPropertySheet->setChanged(newIndex, changed);
1433 if (d->isReloadableProperty(index)) {
1436 d->m_fwb->addReloadableProperty(
this, index);
1438 d->m_fwb->removeReloadableProperty(
this, index);
1441 d->ensureInfo(index).changed = changed;
1444bool QDesignerPropertySheet::isFakeLayoutProperty(
int index)
const
1446 if (!isAdditionalProperty(index))
1449 switch (propertyType(index)) {
1450 case PropertyLayoutObjectName:
1451#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
1452 case PropertyLayoutSizeConstraint:
1454 case PropertyLayoutHorizontalSizeConstraint:
1455 case PropertyLayoutVerticalSizeConstraint:
1458 case PropertyLayoutLeftMargin:
1459 case PropertyLayoutTopMargin:
1460 case PropertyLayoutRightMargin:
1461 case PropertyLayoutBottomMargin:
1462 case PropertyLayoutSpacing:
1463 case PropertyLayoutHorizontalSpacing:
1464 case PropertyLayoutVerticalSpacing:
1465 case PropertyLayoutFieldGrowthPolicy:
1466 case PropertyLayoutRowWrapPolicy:
1467 case PropertyLayoutLabelAlignment:
1468 case PropertyLayoutFormAlignment:
1469 case PropertyLayoutBoxStretch:
1470 case PropertyLayoutGridRowStretch:
1471 case PropertyLayoutGridColumnStretch:
1472 case PropertyLayoutGridRowMinimumHeight:
1473 case PropertyLayoutGridColumnMinimumWidth:
1474 return d->m_canHaveLayoutAttributes;
1489bool QDesignerPropertySheet::isVisible(
int index)
const
1491 if (d->invalidIndex(Q_FUNC_INFO, index))
1494 const PropertyType type = propertyType(index);
1495 if (isAdditionalProperty(index)) {
1496 if (isFakeLayoutProperty(index) && d->m_object->isWidgetType()) {
1497 const QLayout *currentLayout = d->layout();
1500 const int visibleMask = qdesigner_internal::LayoutProperties::visibleProperties(currentLayout);
1502 case PropertyLayoutSpacing:
1503 return visibleMask & qdesigner_internal::LayoutProperties::SpacingProperty;
1504 case PropertyLayoutHorizontalSpacing:
1505 case PropertyLayoutVerticalSpacing:
1506 return visibleMask & qdesigner_internal::LayoutProperties::HorizSpacingProperty;
1507 case PropertyLayoutFieldGrowthPolicy:
1508 return visibleMask & qdesigner_internal::LayoutProperties::FieldGrowthPolicyProperty;
1509 case PropertyLayoutRowWrapPolicy:
1510 return visibleMask & qdesigner_internal::LayoutProperties::RowWrapPolicyProperty;
1511 case PropertyLayoutLabelAlignment:
1512 return visibleMask & qdesigner_internal::LayoutProperties::LabelAlignmentProperty;
1513 case PropertyLayoutFormAlignment:
1514 return visibleMask & qdesigner_internal::LayoutProperties::FormAlignmentProperty;
1515 case PropertyLayoutBoxStretch:
1516 return visibleMask & qdesigner_internal::LayoutProperties::BoxStretchProperty;
1517 case PropertyLayoutGridRowStretch:
1518 return visibleMask & qdesigner_internal::LayoutProperties::GridRowStretchProperty;
1519 case PropertyLayoutGridColumnStretch:
1520 return visibleMask & qdesigner_internal::LayoutProperties::GridColumnStretchProperty;
1521 case PropertyLayoutGridRowMinimumHeight:
1522 return visibleMask & qdesigner_internal::LayoutProperties::GridRowMinimumHeightProperty;
1523 case PropertyLayoutGridColumnMinimumWidth:
1524 return visibleMask & qdesigner_internal::LayoutProperties::GridColumnMinimumWidthProperty;
1530 return d->m_info.value(index).visible;
1533 if (isFakeProperty(index)) {
1535 case PropertyWindowModality:
1536 case PropertyWindowOpacity:
1537 return d->m_info.value(index).visible;
1544 const bool visible = d->m_info.value(index).visible;
1546 case PropertyWindowTitle:
1547 case PropertyWindowIcon:
1548 case PropertyWindowFilePath:
1549 case PropertyWindowOpacity:
1550 case PropertyWindowIconText:
1551 case PropertyWindowModified:
1559 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1560 if (!(p->accessFlags() & QDesignerMetaPropertyInterface::WriteAccess))
1563 return p->attributes().testFlag(QDesignerMetaPropertyInterface::DesignableAttribute);
1573bool QDesignerPropertySheet::isEnabled(
int index)
const
1575 if (d->invalidIndex(Q_FUNC_INFO, index))
1577 if (isAdditionalProperty(index))
1580 if (isFakeProperty(index))
1584 if (propertyType(index) == PropertyGeometry && d->m_object->isWidgetType()) {
1586 const qdesigner_internal::LayoutInfo::Type lt = qdesigner_internal::LayoutInfo::laidoutWidgetType(d->m_core, qobject_cast<QWidget *>(d->m_object), &isManaged);
1587 return !isManaged || lt == qdesigner_internal::LayoutInfo::NoLayout;
1590 if (d->m_info.value(index).visible)
1596 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1597 if (!p->accessFlags().testFlag(QDesignerMetaPropertyInterface::WriteAccess))
1600 if (!p->attributes().testFlag(QDesignerMetaPropertyInterface::DesignableAttribute))
1603 const PropertyType type = propertyType(index);
1604 if (type == PropertyChecked && d->m_objectFlags.testFlag(CheckableProperty))
1605 return d->m_object->property(
"checkable").toBool();
1688QObject *QDesignerAbstractPropertySheetFactory::extension(QObject *object,
const QString &iid)
const
1693 if (iid != m_impl->m_propertySheetId && iid != m_impl->m_dynamicPropertySheetId)
1696 QObject *ext = m_impl->m_extensions.value(object, 0);
1697 if (!ext && (ext = createPropertySheet(object,
const_cast<QDesignerAbstractPropertySheetFactory*>(
this)))) {
1698 connect(ext, &QObject::destroyed,
this, &QDesignerAbstractPropertySheetFactory::objectDestroyed);
1699 connect(object, &QObject::destroyed,
this, &QDesignerAbstractPropertySheetFactory::objectDestroyed);
1700 m_impl->m_extensions.insert(object, ext);