c++ - Call function when child dialog window is closed in Qt -
after trying multitude of combinations i'm unable qt call function in main window dialog when dialog closed.
i looked , tried few things signal , slot no avail: qobject::connect( edit_dialog, signal( finished(int) ), this, refresh_table() );
in short i've got table displays data custom container. edit_dialog enables editing of values , sending changes directly database through set of external functions (they work). once dialog closed have table reloaded updated data container pulls database.
db->container->gui table
i realize qt has native libraries read/write dbs that's no purpose. need way automatically call refresh_table()
function i've tried putting inside 'public slots' without more success.
you have connect refresh table function slot( )
connect( edit_dialog, signal( finished(int) ), this, slot( refresh_table() ) );
other there seems nothing wrong approach.
you can create own signal , connect refresh_table() function using example on click event of "ok" , "cancel" button in dialog , calling
emit ownsignal( );
in it.