void Server::startRead(){ int m=client->bytesAvailable(); char *buffer =new char[client->bytesAvailable()]; client->read(buffer, client->bytesAvailable()); client->close(); emit DataAccepted(buffer,m);}
QString str;QByteArray array(text,count);str="";for (int i=0; i<count; i++){ str1=QObject::trUtf8(text+i); str+=str1;}ui->ServerEdit->setText(str)
QObject::trUtf8(text)
str="";for (int i=0; i<count; i++) { str+=QObject::trUtf8(text+i); }
void MainWindow::setServerEdit(char* text, qint64 count){ QString str,str1; QByteArray array(text,count); str=""; for (int i=0; i<count; i++) { str1=QObject::trUtf8(text+i); str+=str1; } ui->ServerEdit->setText(str);}