To show the code below:
The static uint16_t row;
Uint16_t I=0;
QTableWidgetItem * Im_cell [13].
If (STR) isEmpty ())
{
QDebug () & lt; & lt;" The message the empty ";
return;
}
QTime tm_current=QTime: : currentTime ();
QString str_time=tm_current. ToString (hh: mm: ss. "z");
PTw - & gt; SetRowCount (row + 1);
QTableWidgetItem * Im_time=new QTableWidgetItem ();
Im_time - & gt; SetText (str_time);
PTw - & gt; SetItem (row, 0, Im_time);
Im_time - & gt; SetFlags (Im_time - & gt; Flags () & amp; (~ Qt: : ItemIsEditable));
for (i=0; I
Im_cell [I]=new QTableWidgetItem ();
Im_cell [I] - & gt; SetText (STR [I]);
PTw - & gt; SetItem (row, "I + 1, Im_cell [I]);
Im_cell [I] - & gt; SetFlags (Im_cell [I] - & gt; Flags () & amp; (~ Qt: : ItemIsEditable));
}
//pTw - & gt; ResizeColumnsToContents ();//xy
PTw - & gt; ScrollToBottom ();
Row++;
CodePudding user response:
Can open a print another thread, namely form data display and print can be divided into two threads