c++ - tutorials - virtual destructor in derived class
Why is QWidget's destructor not virtual? (1)
The destructor is virtual, because QWidget derives from QObject which does have a virtual destructor. Why it's not declared virtual in the code is a either style issue or a harmless mistake. I would have declared it virtual myself.
Looking at qwidget.h, I found the destructor as below:
I was wondering why this is not declared as virtual