[PyKDE] QDialog and multiple buttons

Tom Brown tom at thebrownboys.net
Tue Aug 2 13:53:23 BST 2005


Hi,

I would like to create a dialog with three buttons: 'Heads', 'Tails', 
and 'Cancel'. If I only had the 'Heads' and 'Tails' buttons then my 
life would be easy. I would just connect the 'Heads' button up to the 
accept() slot and connect the 'Tails' button up to the reject() slot. 
What do I do with the 'Cancel' button? Is there a way to detect which 
button was clicked and modify the result so exec_loop() returns 
something other than Accepted or Rejected? Is there a better way of 
doing this?

Thanks,
Tom




More information about the PyQt mailing list