PDA

View Full Version : accepted() alternative



hojoff79
19th January 2011, 01:51
I am looking for another way to pass on an accepted() type slot variable in addition to an already existing accepted() slot.

I have a dialog box with two buttons, one of them has a slot calling the accepted() call so another source file can see if that button has been pushed, but I don't know how to do it with the other button. I want the main source file to know which button I pushed (but the buttons have unique values, so I can't use a Save or Delete or anything like that).

Thank you in advance

wysota
19th January 2011, 02:11
Have your dialog contain a getter which will return the state of the dialog (i.e. the button id that was clicked).

d_stranz
19th January 2011, 02:19
Wouldn't a QDialogButtonBox work in this case? The clicked() signal tells you which button was pressed.