Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Semantic isue: ~[className] overrides a destructor but is not marked 'override'
arsinte_andrei last edited by
Why if I subclass a class like QDialog, QWidget, QMainWindow.... (possible all that came from qWidget)
and if I include in the header file a
virtual void accept() override;
void mousePressEvent(QMouseEvent *event) override;
or any other override function then is showing that I have also to do the same with the destructor... is that right?? none of the Qt examples shows that...
How is proper to write destructors in Qt????
This is a new warning in the current gcc9 (or clang) compiler which is explicitly disabled in Qt code since it's not very useful. But there are are lot of discussions around this, see e.g. here: https://github.com/isocpp/CppCoreGuidelines/issues/721
Qt will not annotate destructors with the override keyword afaik (can't find the discussion on qt-interest atm...)