diff --git a/Analyser/Application.cpp b/Analyser/Application.cpp index 6cf17d3..56dbfc6 100644 --- a/Analyser/Application.cpp +++ b/Analyser/Application.cpp @@ -478,6 +478,7 @@ bool Application::startOta(const QString &path) { LOG(info) << "device already in ota mode."; } else { if (m_communication) { + resetModule(); m_communication->startOta(); } else { emit otaMessage("请先打开设备"); diff --git a/Analyser/qml/LogView.qml b/Analyser/qml/LogView.qml index 9bbafa4..72de61e 100644 --- a/Analyser/qml/LogView.qml +++ b/Analyser/qml/LogView.qml @@ -8,9 +8,11 @@ ListView { message: "" } } - delegate: Text { + delegate: TextEdit { width: ListView.view.width + readOnly: true text: message + selectByMouse: true wrapMode: Text.Wrap } diff --git a/Analyser/qml/Main.qml b/Analyser/qml/Main.qml index 521ebd2..8da3318 100644 --- a/Analyser/qml/Main.qml +++ b/Analyser/qml/Main.qml @@ -54,18 +54,9 @@ Window { } } Item { - // LogView { - // id: logBrowser - // anchors.fill: parent - // } - ScrollView { - id: view + LogView { + id: logBrowser anchors.fill: parent - TextArea { - id: logBrowser - readOnly: true - wrapMode: TextArea.WordWrap - } } Button { text: "清空"