void MyServer::incomingConnection(qintptr socketDescriptor){ qDebug() << socketDescriptor << " connecting..."; MyThread *thread = new MyThread(socketDescriptor,this, &storage); connect(thread,SIGNAL(finished()), thread, SLOT(deleteLater())); thread->run(); }
int main() { MyThread t; t.run(); getch(); }