From 4aa5654ffdd669b36852a47e86fc4552371d04e4 Mon Sep 17 00:00:00 2001 From: wh201906 <62299611+wh201906@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:59:16 +0800 Subject: [PATCH] Try to process the origin output(in hf mf nested) --- mainwindow.cpp | 19 +++++++++++++++++++ mainwindow.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 19ae8ff..fd55575 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -158,3 +158,22 @@ void MainWindow::on_MFChkButton_clicked() } qDebug()<<"***********\n"<setRequiringOutput(true); + ui->commandEdit->setText("hf mf nested 1 *"); + on_sendButton_clicked(); + while(pm3->waitForReadyRead(5000)) + ; + QString result=pm3->getRequiredOutput(); + pm3->setRequiringOutput(false); + result=result.mid(result.indexOf("|---|----------------|---|----------------|---|")); + QStringList keys=result.split("\r\n"); + for(int i=0;i<16;i++) + { + ui->MFKeyWidget->setItem(i,1,new QTableWidgetItem(keys[i+3].mid(7,12).trimmed().toUpper())); + ui->MFKeyWidget->setItem(i,2,new QTableWidgetItem(keys[i+3].mid(28,12).trimmed().toUpper())); + } + qDebug()<<"***********\n"<