void MyServer::incomingConnection(qintptr socketDescriptor){

  qDebug() << socketDescriptor << " connecting...";
  MyThread *thread = new MyThread(socketDescriptor,this, &storage);
  connect(thread,SIGNAL(finished()), thread, SLOT(deleteLater()));
  thread->run();
}
Esempio n. 2
0
int main() {
  MyThread t;
  t.run();

  getch();
}