Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions qt6/src/qml/AlertToolTip.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ Control {
property Item target
property string text
property int timeout: 0
property bool requestVisible: false
property bool _expired: false
readonly property bool _shown: control.visible && !_expired
readonly property bool _shown: requestVisible && !_expired
visible: requestVisible

property point __itemGlobalPos: {
let x = 0, y = 0
Expand All @@ -30,7 +32,10 @@ Control {
Behavior on y {
NumberAnimation { duration: 200 }
}
parent: _shown ? Overlay.overlay : target

@18202781743 18202781743 Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还是没看懂从哪里引入的循环绑定,

qt6/src/qml/AlertToolTip.qml 第 33 行声明式绑定 parent: _shown ? Overlay.overlay : target 形成自引用依赖环:
parent → Overlay.overlay → window → parent

每次 alert 显示/隐藏时反复重父,触发 Qt binding loop 检测。

parent: {
const overlay = target ? target.Overlay.overlay : null
return _shown && overlay ? overlay : target
}
opacity: _shown ? 1 : 0
enabled: _shown
topPadding: DS.Style.alertToolTip.verticalPadding
Expand Down
4 changes: 2 additions & 2 deletions qt6/src/qml/EditPanel.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

Expand Down Expand Up @@ -39,7 +39,7 @@ Rectangle {
sourceComponent: AlertToolTip {
target: control
timeout: alertDuration
visible: showAlert
requestVisible: showAlert
text: alertText
}
}
Expand Down
Loading