
Originally Posted by
amleto
Off topic, but Op has circular reference => design error.
Main window composed of sslserver, and sslserver impl also needs full knowledge of MainWindow.
edit:
I think that main window code in your sslserver is just you being a bit confused. You want to be updating the existing mainwin nit creating a new one. So there you should emit a signal with the new count as an argument. Connect that signal to a slot on your mainwin, and from there you can update the label text
Thanks, I see your point. I already tried SIGNAL-SLOT solution, but I guess I had some error on it. I'll give it another try and get back with the result.
I think I should add following to the sslserver.c:
connect(thread, SIGNAL(finished()), main, SLOT(count_update()));
connect(thread, SIGNAL(finished()), main, SLOT(count_update()));
To copy to clipboard, switch view to plain text mode
I'm not sure though what I should put to the third parameter? Certainly main is not correct. I think this was the problem I faced when I tried to use the SIGNALs for this issue.
Cheers!
Bookmarks