From 77878da1b8bce7a303478368d581f38190680158 Mon Sep 17 00:00:00 2001 From: jared Date: Mon, 28 Dec 2020 22:54:01 +0800 Subject: [PATCH] fixed some warning --- examples/TaoQuickShow/Contents/General/Tables.qml | 2 +- examples/TaoQuickShow/Src/main.cpp | 2 ++ .../imports/TaoQuick/Qml/CusTable/CusTableHeader.qml | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/TaoQuickShow/Contents/General/Tables.qml b/examples/TaoQuickShow/Contents/General/Tables.qml index d31c214..db26a39 100644 --- a/examples/TaoQuickShow/Contents/General/Tables.qml +++ b/examples/TaoQuickShow/Contents/General/Tables.qml @@ -310,7 +310,7 @@ Item { Column { x: cusHeader.x + cusHeader.mouseX y: cusView.y - visible: cusHeader.isSpliting && !cusHeader.isOut + visible: cusHeader.splitingIndex >= 1 height: cusView.height width: 1 spacing: 2 diff --git a/examples/TaoQuickShow/Src/main.cpp b/examples/TaoQuickShow/Src/main.cpp index 91eee98..56514de 100644 --- a/examples/TaoQuickShow/Src/main.cpp +++ b/examples/TaoQuickShow/Src/main.cpp @@ -86,6 +86,8 @@ int main(int argc, char **argv) }); //qml call 'Qt.quit()' will emit engine::quit, here should call qApp->quit QObject::connect(view.engine(), &QQmlEngine::quit, qApp, &QCoreApplication::quit); + //qml clear content before quit + QObject::connect(qApp, &QGuiApplication::aboutToQuit, qApp, [&view](){view.setSource({});}); view.setSource(url); view.moveToScreenCenter(); diff --git a/src/TaoQuick/imports/TaoQuick/Qml/CusTable/CusTableHeader.qml b/src/TaoQuick/imports/TaoQuick/Qml/CusTable/CusTableHeader.qml index 768c15a..94381c1 100644 --- a/src/TaoQuick/imports/TaoQuick/Qml/CusTable/CusTableHeader.qml +++ b/src/TaoQuick/imports/TaoQuick/Qml/CusTable/CusTableHeader.qml @@ -126,7 +126,7 @@ Item { hoverEnabled: true anchors { left: parent.left - leftMargin: 4 + leftMargin: 2 right: parent.right top: parent.top bottom: parent.bottom @@ -146,10 +146,11 @@ Item { } MoveArea { id: moveArea - width: 4 + width: 2 height: parent.height enabled: index > 0 hoverEnabled: true + z: 9 anchors { left: parent.left } @@ -160,8 +161,7 @@ Item { splitingIndex = -1 } } - cursorShape: (pressed - || containsMouse) ? Qt.SplitHCursor : Qt.ArrowCursor + cursorShape: (pressed || containsMouse) ? Qt.SplitHCursor : Qt.ArrowCursor onMove: { var wList = widthList if (index === 0) {