From fe1615bef69e6c1a96286ac88e5e651c591f0d01 Mon Sep 17 00:00:00 2001 From: Wang Zichong Date: Mon, 11 Dec 2023 18:07:21 +0800 Subject: [PATCH] chore: enable cross-page item drag in FullscreenFrame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 全屏启动器启用图标拖拽到其它页面。 注:此功能在 Qt 5 下有 BUG,会导致 PageIndicator 更新了但 SwipeView 未翻页。Qt 6 上没有这个问题。 Log: --- qml/FullscreenFrame.qml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qml/FullscreenFrame.qml b/qml/FullscreenFrame.qml index 82346bbe..891e3e04 100644 --- a/qml/FullscreenFrame.qml +++ b/qml/FullscreenFrame.qml @@ -179,12 +179,11 @@ Control { id: dndMovePageTimer interval: 1000 onTriggered: { - // FIXME: why this isn't working? - // if (parent.pageIntent > 0) { - // pages.incrementCurrentIndex() - // } else if (parent.pageIntent < 0) { - // pages.decrementCurrentIndex() - // } + if (parent.pageIntent > 0) { + pages.incrementCurrentIndex() + } else if (parent.pageIntent < 0) { + pages.decrementCurrentIndex() + } } } }