Pass parent to QVBoxLayout ctor instead of calling setLayout()
Always pass a parent when creating a QObject.
c.f. https://codereview.qt-project.org/c/qt/qtbase/+/318964/2 https://codereview.qt-project.org/c/qt/qtbase/+/321252
Edited by Ahmad Samir