Skip to content

Commit

Permalink
自动换行显示
Browse files Browse the repository at this point in the history
  • Loading branch information
heyuanjie87 committed Apr 15, 2022
1 parent 8169a6d commit cccf896
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions simple/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ MainWindow::MainWindow(QWidget *parent) :

term = new QTermWidget(this);

term->setLineWrapMode(QPlainTextEdit::LineWrapMode::WidgetWidth);
setCentralWidget(term);
setAcceptDrops(true);

Expand Down Expand Up @@ -236,15 +237,6 @@ void MainWindow::readData()

term->putData(data);
}

QString tmp;

for (int i = 0; i < data.size(); i ++)
{
QString ch;
tmp += ch.sprintf("0x%02X, ", (uint8_t)data[i]);
}
//qDebug(tmp.toStdString().c_str());
}

void MainWindow::handleError(QSerialPort::SerialPortError error)
Expand Down

0 comments on commit cccf896

Please sign in to comment.