I want to make a dialog window that has 4 pushbuttons and I want that when push a button closes the window and the main window it receives something to know that button I press; How I do it?
![]()
I want to make a dialog window that has 4 pushbuttons and I want that when push a button closes the window and the main window it receives something to know that button I press; How I do it?
![]()
The docs say:
Therefore probably the easiest way is to use QSignalMapper or QButtonGroup to transform clicked(void) into clicked(int) and connect it to that slot.void QDialog::done ( int r ) [virtual slot]
Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.
QButtonGroup could be a good choice too as it has a signal called buttonClicked(int id).
J-P Nurmi
Bookmarks