diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2020-06-17 14:00:37 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2020-06-17 12:15:30 +0000 |
commit | 7a29d4658ef3e6db64a5860786c949c64077fe63 (patch) | |
tree | 2beed1bd896776a2a56b9e8457f18ffffeb06201 /src/imports/nativestyle/items | |
parent | a2f664e5fbaf7d879e45510cb259e91fad15e030 (diff) |
Fix active focus handling
We should connect to the control instead of the QQuickStyleItem
This was also the case for the "enabled" and "window" properties
(however, they worked fine, since those properties are inherited by
the parent/child relationship)
Change-Id: Ibcc5dbe8ea10201db558a534e46233617093e9b7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/imports/nativestyle/items')
-rw-r--r-- | src/imports/nativestyle/items/qquickstyleitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/nativestyle/items/qquickstyleitem.cpp b/src/imports/nativestyle/items/qquickstyleitem.cpp index 8c6df605..15fe4ede 100644 --- a/src/imports/nativestyle/items/qquickstyleitem.cpp +++ b/src/imports/nativestyle/items/qquickstyleitem.cpp @@ -89,9 +89,9 @@ QQuickStyleItem::~QQuickStyleItem() void QQuickStyleItem::connectToControl() { - connect(this, &QQuickStyleItem::enabledChanged, this, &QQuickStyleItem::markImageDirty); - connect(this, &QQuickStyleItem::activeFocusChanged, this, &QQuickStyleItem::markImageDirty); - connect(this, &QQuickStyleItem::windowChanged, this, &QQuickStyleItem::markImageDirty); + connect(m_control, &QQuickStyleItem::enabledChanged, this, &QQuickStyleItem::markImageDirty); + connect(m_control, &QQuickItem::activeFocusChanged, this, &QQuickStyleItem::markImageDirty); + connect(m_control, &QQuickStyleItem::windowChanged, this, &QQuickStyleItem::markImageDirty); connect(window(), &QQuickWindow::activeChanged, this, &QQuickStyleItem::markImageDirty); } |