The main problem here is that you only declared gui
as a pointer to tum_ardrone_gui
, but didn't actually create an object. Instead, you should do something like:
tum_ardrone_gui gui = new tum_ardrone_gui();
gui->SendClicked();
But be sure to delete gui
when you're done with it. For instance, if this code is within a widget, simply write
tum_ardrone_gui gui = new tum_ardrone_gui(this);
when allocating gui
and then it will be freed when this widget dies.
As for your question, from C++ standpoint a Qt slot is just a regular method, so call it like a method.