Looking at qwidget.h, I found the destructor as below:
~QWidget();
I was wondering why this is not declared as virtual
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.