[Interest] Resize event handler in Qt 4.8.x

Nikos Chantziaras realnc at gmail.com
Thu Jul 26 08:59:02 CEST 2018


On 26/07/18 08:19, Ramakanth Kesireddy wrote:
> Hi,
> 
> Am using Qt 4.8.x with UI components based on QWidgets.
> 
> In the custom implementation of resize event handler, I would like to 
> know if it is mandatory to invoke QWidget base implementation of 
> resizeEvent or not
It's not. The default implementation is empty. You can check that 
yourself by looking at the source file where QWidget is implemented 
(src/gui/kernel/qwidget.cpp):

   void QWidget::resizeEvent(QResizeEvent * /* event */)
   {
   }

However, I usually still call the base class implementations of 
functions like that, because some of them might need to be called. For 
the ones that are empty, calling them doesn't hurt.




More information about the Interest mailing list