使用Layout的一些Tips
- When you use a layout, you do not need to pass a parent when constructing the child widgets. The layout will automatically reparent the widgets (using QWidget::setParent()) so that they are children of the widget on which the layout is installed. Note: Widgets in a layout are children of the widget on which the layout is installed, not of the layout itself. Widgets can only have other widgets as parent, not layouts.
Terminologies
- moc: meta-object compiler.
Mechanics
Deletion of newed objects
In Qt, a child will automatically be deleted when its parent is being deleted.