I'm currently working on my first GUI cpp application using QT. Right now my aim is to display a dialogue to the user with two buttons: Ok and Cancel. I've used signal and slot editor to make cancel close the window, however what I can't seem to find and manage to do is to run a function from another .cpp file when OK is being clicked. I've googled it and no answers seem to be relevant.
file "mydefault.cpp" -
void MyDefault::on_pushButton_clicked()
{
\\ call function from another .cpp file
}
function which im trying to call in "server.cpp"
void calldefaults(){
...
...
...
}
Question - how to call function "calldefaults()" in "server.cpp" from "mydefaults.cpp"
Any clues or tips are more than welcome, if the answer is super dump just throw it at me :)
Thanks