qt5 parent

  1. 可用用unique_ptr而不是qt的QScopedPointer,后者一般是因为历史遗留而使用
  2. widget.setLayout和layout.addWidget会让 参数中的 变成当前这个的child.
  3. 具有parent、child关系的组件中,父组件会自动销毁子组件。