summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/controls/Private/qquickstyleitem.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp
index 566a46f8..0210e76e 100644
--- a/src/controls/Private/qquickstyleitem.cpp
+++ b/src/controls/Private/qquickstyleitem.cpp
@@ -211,6 +211,7 @@ QQuickStyleItem::QQuickStyleItem(QQuickItem *parent)
setFlag(QQuickItem::ItemHasContents, true);
setSmooth(false);
+ connect(this, SIGNAL(visibleChanged()), this, SLOT(updateItem()));
connect(this, SIGNAL(widthChanged()), this, SLOT(updateItem()));
connect(this, SIGNAL(heightChanged()), this, SLOT(updateItem()));
connect(this, SIGNAL(enabledChanged()), this, SLOT(updateItem()));
@@ -1616,7 +1617,10 @@ bool QQuickStyleItem::hasThemeIcon(const QString &icon) const
bool QQuickStyleItem::event(QEvent *ev)
{
if (ev->type() == QEvent::StyleAnimationUpdate) {
- polish();
+ if (isVisible()) {
+ ev->accept();
+ polish();
+ }
return true;
} else if (ev->type() == QEvent::StyleChange) {
if (m_itemType == ScrollBar)