Hi,
I have a dilaog which opens from MainWindow, After a User Clicks OK, i need to call a function of Dialog How can i do so..?
Please give some sample code.
Hi,
I have a dilaog which opens from MainWindow, After a User Clicks OK, i need to call a function of Dialog How can i do so..?
Please give some sample code.
Make a signal-slot connection from the clicked() signal of the button to a custom slot and in that slot call "the function of Dialog". If you make that "function" a slot, you can connect to it directly.
Sorry i need to call a function of MainWindow on Click on OK Button. Below is code i used
MyClass my;
connect(uiconfig.okButton, SIGNAL(clicked()), &my, SLOT(Test()));
But on click on Button it doesn't goes inside Test function. Please let me know.
Thanks,
It does worked but it didn't got QTreeWidget empty. Actually I have a QTreeWidget in my MainWindow. I open a Dialog from a file open dialog and then it calls that slot which clears the tree by doing ui.treeWidget->clear(), This exectues but tree still doesn't Gets cleared, how should i do it.
Bookmarks