Problem with using functions of others class.
I start a little project that have to goal to create a little online chat.
I met a problem:
I have a MainWindow class and a TcpServer class.
I included TcpServer in MainWindow, but I would need to be able to call a function of MainWindow in TcpServer.
I tried some ways to do it (give the MainWindow object as parameter, using pointer on functions) but it wasn't working.
If you want to see the code to understand the problem, please tell me and I'll post it.
Thanks in advance :).
Normally you use signals and slots.
Like when TcpServer got a connection it calls a slot in mainwindow.
You set it up with connect.