how to display / update textEdit ?
Unsolved
General and Desktop
-
The attached snippet of code runs fine, however,
the Process... " blocks " the
text = " hcitool scan... ";
MWBD->ui->textEdit_3->append(text);
MWBD->update();
MWBD->show();hence its text (in dialog ) appears AFTER the Process.. is finished.
Is the solution to create another "display" process prior to the Process...?
Yes the Process ,,, creates new blocking process which is fine because it runs in real time and has to finish.
text = " hcitool scan... "; MWBD->ui->textEdit_3->append(text); MWBD->update(); MWBD->show(); text = BTUL->ProcessCommand_Raw(" hcitool "," scan " ); qDebug() << text; MWBD->ui->textEdit_3->append(text); // displays both text
-
@AnneRanch Either start process with a delay
QTimer::singleShot()
, or through meta object systemQMetaObject::invokeMethod()
, or move it to another thread, or let the app process events before calling your blocking code:qApp->processEvents(); text = BTUL->ProcessCommand_Raw(" hcitool "," scan " );