当主程序接收到串口的数据后会执行线程,然后主程序和线程同时接收串口的数据 请问
要怎么实现。 我自己写的每次执行这个线程窗口都会卡死。
主程序:
else if(t=="ff000707ee")
     {
            ui->sendlineEdit->clear();
           ui->sendlineEdit->insert(tr("xiuxirimoshi"));
           xiuxixianch=new xiuxi();
           xiuxixianch->start();
     }
线程
void  xiuxi::run()
{
    while(!stopped)
   {
        QString t;
     QByteArray temp = myCom->readAll();
    if(temp!="")
    {
   t=temp.toHex();
    }
        if(t=="ff000303ee")
        {
        }