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(), resolvePropertyValue(index, value));
1211 if (d->m_object->isWidgetType()) {
1212 QWidget *w = qobject_cast<QWidget *>(d->m_object);
1213 w->setStyleSheet(w->styleSheet());
1216 d->m_addProperties[index] = value;
1217 }
else if (isFakeProperty(index)) {
1218 setFakeProperty(index, value);
1220 if (d->isResourceProperty(index))
1221 d->setResourceProperty(index, value);
1222 if (d->isStringProperty(index))
1223 d->setStringProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value));
1224 if (d->isStringListProperty(index))
1225 d->setStringListProperty(index, qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value));
1226 if (d->isKeySequenceProperty(index))
1227 d->setKeySequenceProperty(index, qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value));
1228 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1229 p->write(d->m_object, resolvePropertyValue(index, value));
1230 if (qobject_cast<QGroupBox *>(d->m_object) && propertyType(index) == PropertyCheckable) {
1231 const int idx = indexOf(u"focusPolicy"_s);
1232 if (!isChanged(idx)) {
1233 qdesigner_internal::PropertySheetEnumValue e = qvariant_cast<qdesigner_internal::PropertySheetEnumValue>(property(idx));
1234 if (value.toBool()) {
1235 const QDesignerMetaPropertyInterface *p = d->m_meta->property(idx);
1236 p->write(d->m_object, Qt::NoFocus);
1237 e.value = Qt::StrongFocus;
1240 setFakeProperty(idx, v);
1242 e.value = Qt::NoFocus;
1245 setFakeProperty(idx, v);
1261bool QDesignerPropertySheet::reset(
int index)
1263 if (d->invalidIndex(Q_FUNC_INFO, index))
1265 if (d->isStringProperty(index)) {
1266 qdesigner_internal::PropertySheetStringValue value;
1268 if (propertyName(index) ==
"objectName"_L1) {
1269 const QVariant classNameDefaultV = d->m_object->property(
"_q_classname");
1270 if (classNameDefaultV.isValid())
1271 value.setValue(classNameDefaultV.toString());
1272 }
else if (!isAdditionalProperty(index)) {
1273 const QDesignerMetaPropertyInterface *property = d->m_meta->property(index);
1274 if ((property->accessFlags() & QDesignerMetaPropertyInterface::ResetAccess) && property->reset(d->m_object))
1275 value.setValue(property->read(d->m_object).toString());
1279 setProperty(index, QVariant::fromValue(value));
1282 if (d->isStringListProperty(index))
1283 setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue()));
1284 if (d->isKeySequenceProperty(index))
1285 setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue()));
1286 if (d->isResourceProperty(index)) {
1287 setProperty(index, d->emptyResourceProperty(index));
1290 if (isDynamic(index)) {
1291 const QString propName = propertyName(index);
1292 const QVariant oldValue = d->m_addProperties.value(index);
1293 const QVariant defaultValue = d->m_info.value(index).defaultValue;
1294 QVariant newValue = defaultValue;
1295 if (d->isStringProperty(index)) {
1296 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetStringValue(newValue.toString()));
1297 }
else if (d->isStringListProperty(index)) {
1298 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetStringListValue(newValue.toStringList()));
1299 }
else if (d->isKeySequenceProperty(index)) {
1300 const QKeySequence keySequence = qvariant_cast<QKeySequence>(newValue);
1301 newValue = QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue(keySequence));
1303 if (oldValue == newValue)
1305 d->m_object->setProperty(propName.toUtf8(), defaultValue);
1306 d->m_addProperties[index] = newValue;
1308 }
else if (!d->m_info.value(index).defaultValue.isNull()) {
1309 setProperty(index, d->m_info.value(index).defaultValue);
1312 if (isAdditionalProperty(index)) {
1313 const PropertyType pType = propertyType(index);
1314 if (d->m_objectType == ObjectLabel && pType == PropertyBuddy) {
1315 setProperty(index, QVariant(QByteArray()));
1318 if (isFakeLayoutProperty(index)) {
1321 case PropertyLayoutObjectName:
1322 setProperty(index, QString());
1324#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
1325 case PropertyLayoutSizeConstraint:
1327 case PropertyLayoutHorizontalSizeConstraint:
1328 case PropertyLayoutVerticalSizeConstraint:
1330 setProperty(index, QVariant(QLayout::SetDefaultConstraint));
1332 case PropertyLayoutBoxStretch:
1333 case PropertyLayoutGridRowStretch:
1334 case PropertyLayoutGridColumnStretch:
1335 case PropertyLayoutGridRowMinimumHeight:
1336 case PropertyLayoutGridColumnMinimumWidth:
1337 case PropertyLayoutFieldGrowthPolicy:
1338 case PropertyLayoutRowWrapPolicy:
1339 case PropertyLayoutLabelAlignment:
1340 case PropertyLayoutFormAlignment: {
1341 QDesignerPropertySheetExtension *layoutPropertySheet;
1342 if (d->layout(&layoutPropertySheet) && layoutPropertySheet)
1343 return layoutPropertySheet->reset(layoutPropertySheet->indexOf(d->transformLayoutPropertyName(index)));
1351 switch (d->m_objectType) {
1352 case ObjectLayoutWidget:
1353 if (pType == PropertyLayoutLeftMargin ||
1354 pType == PropertyLayoutTopMargin ||
1355 pType == PropertyLayoutRightMargin ||
1356 pType == PropertyLayoutBottomMargin)
1362 setProperty(index, value);
1367 if (isFakeProperty(index)) {
1368 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1369 const bool result = p->reset(d->m_object);
1370 d->m_fakeProperties[index] = p->read(d->m_object);
1373 if (propertyType(index) == PropertyGeometry && d->m_object->isWidgetType()) {
1374 if (QWidget *w = qobject_cast<QWidget*>(d->m_object)) {
1375 QWidget *widget = w;
1376 if (qdesigner_internal::Utils::isCentralWidget(d->m_fwb, widget) && d->m_fwb->parentWidget())
1377 widget = d->m_fwb->parentWidget();
1379 if (widget != w && widget->parentWidget()) {
1380 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
1381 widget->parentWidget()->adjustSize();
1383 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
1384 widget->adjustSize();
1390 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1391 return p->reset(d->m_object);
1415void QDesignerPropertySheet::setChanged(
int index,
bool changed)
1417 if (d->invalidIndex(Q_FUNC_INFO, index))
1419 if (isAdditionalProperty(index)) {
1420 if (isFakeLayoutProperty(index)) {
1421 QDesignerPropertySheetExtension *layoutPropertySheet;
1422 if (d->layout(&layoutPropertySheet) && layoutPropertySheet) {
1423 const QString newPropName = d->transformLayoutPropertyName(index);
1424 if (!newPropName.isEmpty()) {
1425 const int newIndex = layoutPropertySheet->indexOf(newPropName);
1427 layoutPropertySheet->setChanged(newIndex, changed);
1432 if (d->isReloadableProperty(index)) {
1435 d->m_fwb->addReloadableProperty(
this, index);
1437 d->m_fwb->removeReloadableProperty(
this, index);
1440 d->ensureInfo(index).changed = changed;
1443bool QDesignerPropertySheet::isFakeLayoutProperty(
int index)
const
1445 if (!isAdditionalProperty(index))
1448 switch (propertyType(index)) {
1449 case PropertyLayoutObjectName:
1450#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
1451 case PropertyLayoutSizeConstraint:
1453 case PropertyLayoutHorizontalSizeConstraint:
1454 case PropertyLayoutVerticalSizeConstraint:
1457 case PropertyLayoutLeftMargin:
1458 case PropertyLayoutTopMargin:
1459 case PropertyLayoutRightMargin:
1460 case PropertyLayoutBottomMargin:
1461 case PropertyLayoutSpacing:
1462 case PropertyLayoutHorizontalSpacing:
1463 case PropertyLayoutVerticalSpacing:
1464 case PropertyLayoutFieldGrowthPolicy:
1465 case PropertyLayoutRowWrapPolicy:
1466 case PropertyLayoutLabelAlignment:
1467 case PropertyLayoutFormAlignment:
1468 case PropertyLayoutBoxStretch:
1469 case PropertyLayoutGridRowStretch:
1470 case PropertyLayoutGridColumnStretch:
1471 case PropertyLayoutGridRowMinimumHeight:
1472 case PropertyLayoutGridColumnMinimumWidth:
1473 return d->m_canHaveLayoutAttributes;
1488bool QDesignerPropertySheet::isVisible(
int index)
const
1490 if (d->invalidIndex(Q_FUNC_INFO, index))
1493 const PropertyType type = propertyType(index);
1494 if (isAdditionalProperty(index)) {
1495 if (isFakeLayoutProperty(index) && d->m_object->isWidgetType()) {
1496 const QLayout *currentLayout = d->layout();
1499 const int visibleMask = qdesigner_internal::LayoutProperties::visibleProperties(currentLayout);
1501 case PropertyLayoutSpacing:
1502 return visibleMask & qdesigner_internal::LayoutProperties::SpacingProperty;
1503 case PropertyLayoutHorizontalSpacing:
1504 case PropertyLayoutVerticalSpacing:
1505 return visibleMask & qdesigner_internal::LayoutProperties::HorizSpacingProperty;
1506 case PropertyLayoutFieldGrowthPolicy:
1507 return visibleMask & qdesigner_internal::LayoutProperties::FieldGrowthPolicyProperty;
1508 case PropertyLayoutRowWrapPolicy:
1509 return visibleMask & qdesigner_internal::LayoutProperties::RowWrapPolicyProperty;
1510 case PropertyLayoutLabelAlignment:
1511 return visibleMask & qdesigner_internal::LayoutProperties::LabelAlignmentProperty;
1512 case PropertyLayoutFormAlignment:
1513 return visibleMask & qdesigner_internal::LayoutProperties::FormAlignmentProperty;
1514 case PropertyLayoutBoxStretch:
1515 return visibleMask & qdesigner_internal::LayoutProperties::BoxStretchProperty;
1516 case PropertyLayoutGridRowStretch:
1517 return visibleMask & qdesigner_internal::LayoutProperties::GridRowStretchProperty;
1518 case PropertyLayoutGridColumnStretch:
1519 return visibleMask & qdesigner_internal::LayoutProperties::GridColumnStretchProperty;
1520 case PropertyLayoutGridRowMinimumHeight:
1521 return visibleMask & qdesigner_internal::LayoutProperties::GridRowMinimumHeightProperty;
1522 case PropertyLayoutGridColumnMinimumWidth:
1523 return visibleMask & qdesigner_internal::LayoutProperties::GridColumnMinimumWidthProperty;
1529 return d->m_info.value(index).visible;
1532 if (isFakeProperty(index)) {
1534 case PropertyWindowModality:
1535 case PropertyWindowOpacity:
1536 return d->m_info.value(index).visible;
1543 const bool visible = d->m_info.value(index).visible;
1545 case PropertyWindowTitle:
1546 case PropertyWindowIcon:
1547 case PropertyWindowFilePath:
1548 case PropertyWindowOpacity:
1549 case PropertyWindowIconText:
1550 case PropertyWindowModified:
1558 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1559 if (!(p->accessFlags() & QDesignerMetaPropertyInterface::WriteAccess))
1562 return p->attributes().testFlag(QDesignerMetaPropertyInterface::DesignableAttribute);
1572bool QDesignerPropertySheet::isEnabled(
int index)
const
1574 if (d->invalidIndex(Q_FUNC_INFO, index))
1576 if (isAdditionalProperty(index))
1579 if (isFakeProperty(index))
1583 if (propertyType(index) == PropertyGeometry && d->m_object->isWidgetType()) {
1585 const qdesigner_internal::LayoutInfo::Type lt = qdesigner_internal::LayoutInfo::laidoutWidgetType(d->m_core, qobject_cast<QWidget *>(d->m_object), &isManaged);
1586 return !isManaged || lt == qdesigner_internal::LayoutInfo::NoLayout;
1589 if (d->m_info.value(index).visible)
1595 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
1596 if (!p->accessFlags().testFlag(QDesignerMetaPropertyInterface::WriteAccess))
1599 if (!p->attributes().testFlag(QDesignerMetaPropertyInterface::DesignableAttribute))
1602 const PropertyType type = propertyType(index);
1603 if (type == PropertyChecked && d->m_objectFlags.testFlag(CheckableProperty))
1604 return d->m_object->property(
"checkable").toBool();
1687QObject *QDesignerAbstractPropertySheetFactory::extension(QObject *object,
const QString &iid)
const
1692 if (iid != m_impl->m_propertySheetId && iid != m_impl->m_dynamicPropertySheetId)
1695 QObject *ext = m_impl->m_extensions.value(object, 0);
1696 if (!ext && (ext = createPropertySheet(object,
const_cast<QDesignerAbstractPropertySheetFactory*>(
this)))) {
1697 connect(ext, &QObject::destroyed,
this, &QDesignerAbstractPropertySheetFactory::objectDestroyed);
1698 connect(object, &QObject::destroyed,
this, &QDesignerAbstractPropertySheetFactory::objectDestroyed);
1699 m_impl->m_extensions.insert(object, ext);