I’ve override resizeEvent(QResizeEvent * /* SizeEvent */) in a custom widget and I’m wondering if I should call SizeEvent->accept() on the event or just let it pass along.
Since I’m getting it from the parent widget, I’m assuming I can safely accept it, but I haven’t been able to find a definitive answer.
Thanks,
You don’t have to. If you do, nothing bad will happen. (Except perhaps your team believing they have to accept resize events.) See a few implementations of
resizeEvent()in Qt:QResizeEvent::isAcceptedis not used in a meaningful way in Qt (as of 4.6.3). As a rule, the documentation of the event class will be explicit whenaccept()andignore()have a special meaning. It usually is the case with input events (mouse, key, tablet, touch), notifications that something should be displayed (context menu, help, what is this, tooltip) or that something will hapen, but you can avoid it (close a window).