I have 2 methods in mind:
METHOD 1: Signal-Slot way
In you Accounts.h, the functions that you need should be declared as "public slots".
@public slots:
void deposit();
void withdraw();
//etc@
Then in your ATMWindow, use connect()
@Accounts *accounts=new Account();//just guessing if your class name is "Accounts"
QOBject::connect(depositbutton,SIGNAL(clicked(),accounts,SLOT(deposit()));
QOBject::connect(withdrawbutton,SIGNAL(clicked(),accounts,SLOT(withdraw()));@
METHOD 2: Just a public function
In you Accounts.h, the functions that you need should be declared as "public".
@public:
void deposit();
void withdraw();
//etc@
Suppose you are using .ui file in Qt Creator, just right click onto a button then look for "go to slot" then find "clicked". It will generate a function for you where you can call the functions:
@void ATMWindows::on_depositbutton_clicked() //just an example... this should be generated by Qt Creator
{
accounts->deposit(); //make sure youu have declared accounts in the header file so that it can be accessed globally [in your class]
}@