diff --git a/src/designer/src/components/formeditor/qdesigner_resource.cpp b/src/designer/src/components/formeditor/qdesigner_resource.cpp
index 6007ba0cd1fa4a259ea76aa2152e5f3f27d1e377..0a6a00e5135ee2fd75994651565397849e14cea0 100644
--- a/src/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/src/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -938,7 +938,9 @@ void QDesignerResource::applyProperties(QObject *o, const QList<DomProperty*> &p
     const DomPropertyList::const_iterator cend = properties.constEnd();
     for (DomPropertyList::const_iterator it = properties.constBegin(); it != cend; ++it) {
         const DomProperty *p = *it;
-        const QString propertyName = p->attributeName();
+        QString propertyName = p->attributeName();
+        if (propertyName == QLatin1String("numDigits") && o->inherits("QLCDNumber")) // Deprecated in Qt 4, removed in Qt 5.
+            propertyName = QLatin1String("digitCount");
         const int index = sheet->indexOf(propertyName);
         QVariant v;
         if (!readDomEnumerationValue(p, sheet, index, v))
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index e606c46fb0b9af28055f5a585d8c4d5c56597508..319059cb90ad783baff297af6ac7b533fa4a149f 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -968,7 +968,9 @@ void QAbstractFormBuilder::applyProperties(QObject *o, const QList<DomProperty*>
     for (DomPropertyList::const_iterator it = properties.constBegin(); it != cend; ++it) {
         const QVariant v = toVariant(o->metaObject(), *it);
         if (!v.isNull()) {
-            const  QString attributeName = (*it)->attributeName();
+            QString attributeName = (*it)->attributeName();
+            if (attributeName == QLatin1String("numDigits") && o->inherits("QLCDNumber")) // Deprecated in Qt 4, removed in Qt 5.
+                attributeName = QLatin1String("digitCount");
             if (!d->applyPropertyInternally(o, attributeName, v))
                 o->setProperty(attributeName.toUtf8(), v);
         }