Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Augment Behavior for XButtonBox accepted() and rejected()



  • I want to add some behavior before the default behavior for XButtonBox accepted() and rejected(). I did the following:

    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    

    The code in my accept() method gets executed, but I'd like to execute the default behavior for accepted() after that. I want to do the same for rejected(). I.e., I don't what to override the behavior for accepted() and rejected(), I want to augment their behavior. How do I go about that?



  • Found the problem. Apparently I overrided the behavior because I used a method name know to XButtonBox (accept()). Once I changed that, everything work fine.


Log in to reply