diff options
| author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-08-22 09:33:17 +0300 |
|---|---|---|
| committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-08-22 09:33:17 +0300 |
| commit | c6fdadd916a7568c1d71b750e054ca9aa2fd5dfc (patch) | |
| tree | bbd5690b38a5e0df66dd070a9e9f42b0d1b2b673 /src/quicktemplates2 | |
| parent | a7c766a9863605eb81e8f0cdb4d2b93e087b5bde (diff) | |
| parent | e436dad999060b92965291b45c0e95a3b93f5866 (diff) | |
Merge tag 'v6.2.13-lts' into tqtc/lts-6.2-opensourcev6.2.13-lts-lgpl6.2
Qt 6.2.13-lts release
Conflicts solved:
dependencies.yaml
Change-Id: I3cbe1ce4293179888e236dd1a3a299cd2c66c950
Diffstat (limited to 'src/quicktemplates2')
| -rw-r--r-- | src/quicktemplates2/qquickcontrol.cpp | 14 | ||||
| -rw-r--r-- | src/quicktemplates2/qquickoverlay.cpp | 7 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index 8a46d040f2..f999aec9b7 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -385,12 +385,22 @@ void QQuickControlPrivate::resizeBackground() bool changeHeight = false; if (((!p->widthValid() || !extra.isAllocated() || !extra->hasBackgroundWidth) && qFuzzyIsNull(background->x())) || (extra.isAllocated() && (extra->hasLeftInset || extra->hasRightInset))) { - background->setX(getLeftInset()); + const auto leftInset = getLeftInset(); + if (!qt_is_nan(leftInset) && p->x.valueBypassingBindings() != leftInset) { + // We bypass the binding here to prevent it from being removed + p->x.setValueBypassingBindings(leftInset); + p->dirty(DirtyType::Position); + } changeWidth = !p->width.hasBinding(); } if (((!p->heightValid() || !extra.isAllocated() || !extra->hasBackgroundHeight) && qFuzzyIsNull(background->y())) || (extra.isAllocated() && (extra->hasTopInset || extra->hasBottomInset))) { - background->setY(getTopInset()); + const auto topInset = getTopInset(); + if (!qt_is_nan(topInset) && p->y.valueBypassingBindings() != topInset) { + // We bypass the binding here to prevent it from being removed + p->y.setValueBypassingBindings(topInset); + p->dirty(DirtyType::Position); + } changeHeight = !p->height.hasBinding(); } if (changeHeight || changeWidth) { diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp index 1829f9a30e..62abaae005 100644 --- a/src/quicktemplates2/qquickoverlay.cpp +++ b/src/quicktemplates2/qquickoverlay.cpp @@ -498,6 +498,13 @@ bool QQuickOverlay::childMouseEventFilter(QQuickItem *item, QEvent *event) case QEvent::HoverEnter: case QEvent::HoverMove: case QEvent::HoverLeave: + // If the control item has already been hovered, allow the hover leave event + // to be processed by the same item for resetting its internal hovered state + // instead of filtering it here. + if (auto *control = qobject_cast<QQuickControl *>(item)) { + if (control->isHovered() && event->type() == QEvent::HoverLeave) + return false; + } handled = d->handleHoverEvent(item, static_cast<QHoverEvent *>(event), popup); break; |
