I've got a FTP application written in c++. Now I'm adding a simple GUI to my project via the Qt plugin for VS2010. The mechanism to connect to the server is very simple. After typing both IP and PORT the connection is stablished and an object is created. This object (from a class I've written) can call several functions such as: ask for the available files on server, download an specific file, etc.
My question is: if that object is created after pressing a button (and calling the function it is linked to) is there any way to return that object? Sure there is but, how and where in the code should it be stored/declared. Here is the code line:
connect(ui.btn_connect,SIGNAL(clicked()),this,SLOT(on_SayConnect()));
How should I call the function "on_SayConnect()" if I want an object to be returned using the connect (SIGNAL/SLOT) syntax? Thank you in advance.