mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
19 lines
386 B
C++
19 lines
386 B
C++
#include "nonblockedinput.h"
|
|
|
|
NonBlockedInput::NonBlockedInput(QObject *parent)
|
|
{
|
|
this->moveToThread(&thread);
|
|
connect(&thread,&QThread::started, this, &NonBlockedInput::ReadLine);
|
|
thread.start();
|
|
}
|
|
|
|
void NonBlockedInput::ReadLine()
|
|
{
|
|
QTextStream inputStream(stdin);
|
|
QString line;
|
|
|
|
while (inputStream.readLineInto(&line)){
|
|
emit LineIsRead(line);
|
|
}
|
|
}
|