diff -r b72c6db6890b -r 5dc02b23752f tools/designer/src/lib/shared/formwindowbase.cpp --- a/tools/designer/src/lib/shared/formwindowbase.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/tools/designer/src/lib/shared/formwindowbase.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -72,6 +72,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -181,7 +182,17 @@ QMapIterator itIndex(itSheet.value()); while (itIndex.hasNext()) { const int index = itIndex.next().key(); - sheet->setProperty(index, sheet->property(index)); + const QVariant newValue = sheet->property(index); + if (qobject_cast(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) { + const PropertySheetStringValue newString = qVariantValue(newValue); + // optimize a bit, reset only if the text value might contain a reference to qt resources + // (however reloading of icons other than taken from resources might not work here) + if (newString.value().contains(QLatin1String(":/"))) { + const QVariant resetValue = qVariantFromValue(PropertySheetStringValue()); + sheet->setProperty(index, resetValue); + } + } + sheet->setProperty(index, newValue); } if (QTabWidget *tabWidget = qobject_cast(sheet->object())) { const int count = tabWidget->count();