Hi I am new qt programming, I tried to use threadedfortune example it works fine but, when I replace the dialog class by QMainWindow (ui) the program doesn't work?
any idea I did not change the code of fortuneserver.* and fortunethread.*, I just repace dialog.* by ui.*
when I run it, it seems connected but not responding
any help thanks.
void ui::runserver()
{
QHostAddress hostadd("127.0.0.1");
if (!server.listen(hostadd,20000)) {
cout<<"Threaded Fortune ServerUnable to start the server: %1."<<server.errorString().toStdString()<<endl;
close();
return;
}
cout<<server.serverAddress().toString().toStdStrin g()<<" at port "<<server.serverPort()<<endl;
}
Bookmarks