diff --git a/svg.cpp b/svg.cpp index f016f4f2f..f7564c1fb 100644 --- a/svg.cpp +++ b/svg.cpp @@ -694,6 +694,7 @@ void Svg::resize(const QSizeF &size) d->size = size; d->localRectCache.clear(); + emit sizeChanged(); } void Svg::resize() @@ -705,6 +706,7 @@ void Svg::resize() d->size = d->naturalSize; d->localRectCache.clear(); + emit sizeChanged(); } QSize Svg::elementSize(const QString &elementId) const diff --git a/svg.h b/svg.h index 9942bc50f..0d4d15b01 100644 --- a/svg.h +++ b/svg.h @@ -57,7 +57,7 @@ class PLASMA_EXPORT Svg : public QObject { Q_OBJECT Q_ENUMS(ContentType) - Q_PROPERTY(QSize size READ size WRITE resize) + Q_PROPERTY(QSize size READ size WRITE resize NOTIFY sizeChanged) Q_PROPERTY(bool multipleImages READ containsMultipleImages WRITE setContainsMultipleImages) Q_PROPERTY(QString imagePath READ imagePath WRITE setImagePath) Q_PROPERTY(bool usingRenderingCache READ isUsingRenderingCache WRITE setUsingRenderingCache) @@ -255,6 +255,7 @@ class PLASMA_EXPORT Svg : public QObject Q_SIGNALS: void repaintNeeded(); + void sizeChanged(); private: SvgPrivate *const d;