How to delete an already existing layout on a widget?

前端 未结 4 397
南笙
南笙 2021-01-04 06:53

You must first delete the existing layout manager (returned by layout()) before you can call setLayout() with the new layout.

4条回答
  •  鱼传尺愫
    2021-01-04 07:14

    You just use

    delete layout;
    

    like you would with any other pointer you created using new.

提交回复
热议问题